BaseIncomplete
CWE-838Inappropriate Encoding for Output Context
Category: other
Description
The product uses or specifies an encoding when generating output to a downstream component, but the specified encoding is not the same as the encoding that is expected by the downstream component.
Common consequences· 1
- Integrity / Confidentiality / Availability — Modify Application Data, Execute Unauthorized Code or CommandsAn attacker could modify the structure of the message or data being sent to the downstream component, possibly injecting commands.
Potential mitigations· 3
- [Implementation]Use context-aware encoding. That is, understand which encoding is being used by the downstream component, and ensure that this encoding is used. If an encoding can be specified, do so, instead of assuming that the default encoding is the same as the default being assumed by the downstream component.
- [Architecture and Design]Where possible, use communications protocols or data formats that provide strict boundaries between control and data. If this is not feasible, ensure that the protocols or formats allow the communicating components to explicitly state which encoding/decoding method is being used. Some template frameworks provide built-in support.
- [Architecture and Design]
Related CAPEC attack patterns· 1
References
Exploits (incoming)1
| Type | Target | Confidence | Tier |
|---|---|---|---|
| AttackPattern | Generic Cross-Browser Cross-Domain Theftcapec-468 | 100% | live |
(incoming)1
| Type | Target | Confidence | Tier |
|---|---|---|---|
| Vulnerability | CVE-2025-4052cve-2025-4052 | 0% | live |
Related by meaning· 6
Nearest entities by semantic similarity across the cs-graph corpus.