CAPEC-77 / ATTACK-PATTERN
Manipulating User-Controlled Variables
This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An adversary can override variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the adversary can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.
- Category
- CAPEC patterns
- Version / scope
- CAPEC 3.9; release 2023-01-24; publisher status Draft
- Affected / relevant technologies
- Publisher platform scope not separately specified
- Evidence
- Documentation: pinned-source excerpt checked. Execution: not tested. Editorial: curated reference.
Defensive analysis and explicitly authorized assessment only. This website performs no scans, exploitation, model calls or infrastructure changes. Indicators below are investigation opportunities, not proof of compromise or guaranteed detectors.
Mechanism and prerequisites
A variable consumed by the application server is exposed to the client. A variable consumed by the application server can be overwritten by the user. The application server trusts user supplied data to compute business logic. The application server does not perform proper input validation.
Potential impact
Integrity Modify Data Confidentiality Integrity Availability Execute Unauthorized Commands Run Arbitrary Code Confidentiality Read Data Confidentiality Access Control Authorization Gain Privileges
Versioned source scope
This record contains normalized, sometimes shortened source excerpts with editorial safety context. Markup and executable example blocks are omitted. Source-field verification does not establish device testing, a working detector or local applicability.
Publisher: MITRE. Release: CAPEC 3.9. Source checked: 2026-11-18.
Source object: CAPEC-77. Object modified: 2022-09-29.
Attribution and source terms (© The MITRE Corporation; reproduced with permission)Detection and investigation
- A web penetration tool probing a web server may generate abnormal activities recorded on log files. Abnormal traffic such as a high number of request coming from the same client may also rise the warnings from a monitoring system or an intrusion detection tool.
Preserve source timestamps, asset identity and collection context. Correlate independent evidence before attributing malicious intent. In OT, review passive evidence with the process owner; do not induce failures, replay commands or write to controllers to test a hypothesis.
Mitigation and response
- Do not allow override of global variables and do Not Trust Global Variables. If the register_globals option is enabled, PHP will create global variables for each GET, POST, and cookie variable included in the HTTP request. This means that a malicious user may be able to set variables unexpectedly. For instance make sure that the server setting for PHP does not expose global variables.
- A software system should be reluctant to trust variables that have been initialized outside of its trust boundary. Ensure adequate checking is performed when relying on input from outside a trust boundary.
- Separate the presentation layer and the business logic layer. Variables at the business logic layer should not be exposed at the presentation layer. This is to prevent computation of business logic from user controlled input data.
- Use encapsulation when declaring your variables. This is to lower the exposure of your variables.
Apply changes through the asset owner's approved change and recovery process. Documentation review is separate from successful testing or verified production protection.
Related technical context
No protocol-specific mapping is asserted for this entry.
Publisher weakness and attack-pattern relationships
These relationships retain the publisher's source attributes and view context; they do not establish that an attack or weakness applies to a particular system.
- CAPEC-13 → ChildOf → CAPEC-77 Open related reference
- CAPEC-162 → ChildOf → CAPEC-77 Open related reference
- CAPEC-77 → ChildOf → CAPEC-22 Open related reference
- CAPEC-77 → Related_Weakness → CWE-1321 Open related reference
- CAPEC-77 → Related_Weakness → CWE-15 Open related reference
- CAPEC-77 → Related_Weakness → CWE-285 Open related reference
- CAPEC-77 → Related_Weakness → CWE-302 Open related reference
- CAPEC-77 → Related_Weakness → CWE-473 Open related reference
- CAPEC-77 → Related_Weakness → CWE-94 Open related reference
- CAPEC-77 → Related_Weakness → CWE-96 Open related reference
- CWE-1321 → Related_Attack_Pattern → CAPEC-77 Open related reference
- CWE-15 → Related_Attack_Pattern → CAPEC-77 Open related reference
- CWE-285 → Related_Attack_Pattern → CAPEC-77 Open related reference
- CWE-302 → Related_Attack_Pattern → CAPEC-77 Open related reference
- CWE-473 → Related_Attack_Pattern → CAPEC-77 Open related reference
- CWE-94 → Related_Attack_Pattern → CAPEC-77 Open related reference
- CWE-96 → Related_Attack_Pattern → CAPEC-77 Open related reference
Authoritative sources and attribution
Identifiers and source titles belong to OWASP, MITRE, the CVE Program, CISA, NIST or the cited vendor. Source excerpts are attributed and adapted under the linked publisher license; editorial context is separate. This is not an official framework mirror. Review baseline: 2026-11-18. Live documents can change; check exact current applicability.
- https://capec.mitre.org/data/definitions/77.html — Publisher link; not separately HTTP-checked
- capec — source accessed 2026-11-18
Source review supports bounded reference text. It is not execution evidence, a completeness claim, a CVSS assessment, a compliance certification or verification of production security.
