A limited account can become a stepping stone to deeper compromise if the application lets that session drive dynamic class creation. The attacker may instantiate a dangerous XML parser, read sensitive server files, and extract configuration data that exposes database credentials or other secrets. Access control alone is not enough if the backend feature can be repurposed into code execution primitives.
How a Limited Session Becomes a Code-Execution Primitive
A limited backend session is only limited if the server treats that session as a constrained actor. When application logic uses the session to choose a class, loader, parser, or handler at runtime, the boundary shifts from “who is logged in” to “what the backend can be induced to instantiate.” That is where a benign feature can become an execution path.
Dynamic object instantiation is risky because it turns user-influenced input into a control decision, not just a data value. If the reachable class has side effects, file access, network access, or parsing behavior, the session can steer the application into privileged server actions that were never intended for that account.
The core issue is not merely broken access control. It is the combination of backend reachability and dangerous dispatch, where a limited identity can trigger a deeper capability by selecting an unsafe object graph or gadget chain. That is why secure designs treat class selection, parser choice, and factory resolution as trusted code paths, not ordinary request parameters.
What the Attacker Can Do After Reaching the Instantiation Path
Once an attacker can influence object creation, the next step is usually to find a class that exposes a powerful primitive. In this pattern, a dangerous XML parser or similar component may be instantiated and used to read local files, resolve external entities, or otherwise interact with server-side resources that should not be available to the original session.
That file access can expose configuration details, connection strings, API keys, or database credentials. Even when the original account has only narrow business permissions, the backend process may still run with broader filesystem and network privileges, so the attacker is effectively borrowing the application’s trust rather than the user’s nominal role.
This is why exploitation often looks like a privilege jump rather than a simple data leak. The attacker starts with a limited session, pivots into a backend object instantiation path, and then uses the resulting server-side primitive to reach sensitive files or further internal services.
See the broader attack pattern in The 52 NHI Breaches Report for examples where compromised credentials and lateral movement turn an initial foothold into wider exposure.
Why Access Control Alone Does Not Stop This Pattern
Traditional access control answers whether the session should be allowed to call a feature. It does not automatically answer whether the feature itself is safe to expose to that session. If the feature can be repurposed into file read, parser abuse, or gadget execution, then the control is too coarse for the risk.
In practice, the dangerous condition is a mismatch between business authorization and runtime capability. The application may correctly say “this user may reach the backend function,” while failing to restrict what the function can instantiate, what files it can touch, or what protocols the chosen component can invoke.
That gap is why secure review must examine object factories, dependency injection, reflection, template resolution, and parser configuration as part of the trust boundary. If user-influenced input can reach those mechanisms, the review should treat them as attack surface, even when the session itself is low privilege.
Risk and Threat Considerations
This pattern creates a high-impact escalation path because the attacker does not need direct administrative access, only a way to steer privileged backend behavior. The resulting compromise can expose files, credentials, and downstream systems that were outside the original account’s intended scope.
Failure mechanism: User-controlled session state reaches a dynamic instantiation path, and the selected class or parser performs sensitive server-side actions such as file reads or unsafe resolution.
Impact: Sensitive configuration can be disclosed, credentials may be recovered, and the application can become a launch point for deeper compromise or lateral movement.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK and OWASP API Security Top 10 address the attack and risk surface, while NIST SP 800-53 Rev 5, OWASP ASVS and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| MITRE ATT&CK | T1059 — Command and Scripting Interpreter | Dynamic instantiation can become execution of attacker-influenced server-side behavior. |
| Recommendation — Map instantiation-driven execution paths and hunt for post-auth code execution behavior. | ||
| NIST SP 800-53 Rev 5 | AC-6 — Least Privilege | A limited session should not be able to trigger broader server capability than intended. |
| IA-5 — Authenticator Management | Credential exposure in config or files makes secret handling part of the impact path. | |
| Recommendation — Restrict backend functions so low-privilege sessions cannot reach sensitive primitives. Protect and rotate credentials exposed through configuration or file-read abuse. | ||
| OWASP ASVS | V8 — Authorization | The issue is that authorized access to a feature does not guarantee safe backend behavior. |
| V15 — Secure Coding and Architecture | Unsafe dynamic object creation is an architectural weakness that must be removed or constrained. | |
| Recommendation — Verify that authorization checks also constrain unsafe server-side actions. Eliminate user-influenced dynamic instantiation and limit reflective dispatch. | ||
| OWASP API Security Top 10 | API5 — Broken Function Level Authorization | A limited session may reach a function that exposes more power than its role should allow. |
| Recommendation — Enforce function-level authorization on backend operations and sensitive dispatch points. | ||
| CIS Controls v8 | CIS-6 — Access Control Management | Access rights must not allow a low-trust session to invoke high-impact backend behavior. |
| Recommendation — Tighten access to sensitive backend functions and review privileged code paths. | ||
Practitioner Guidance
What to verify: Confirm whether any request parameter, session field, or workflow state can influence class names, parser selection, template resolution, or factory dispatch. If it can, treat that path as security-critical, even if the session is authenticated and low privilege.
Common mistake: Teams often focus on whether the user is authorized to reach the feature and miss that the feature itself can become a general-purpose server primitive. The safer question is whether the backend can still be forced into unsafe behavior after authorization has succeeded.
Practitioner takeaway: If a limited session can choose what the backend instantiates, the real control boundary is not the login state, it is whether runtime dispatch is constrained to safe, non-sensitive components.
Related resources from NHI Mgmt Group
- What happens when an attacker uses a compromised Global Administrator account to extend Azure control?
- What happens after an attacker hijacks a user session in Microsoft 365 or a similar workspace?
- What happens when a PLC is compromised and attackers can reach its control interface?
- What happens when unconstrained delegation is enabled on a server that an attacker can control?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on September 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org