CAPEC-201: Serialized Data External Linking
An adversary creates a serialized data file (e.g. XML, YAML, etc...) that contains an external data reference. Because serialized data parsers may not validate documents with external references, there may be no checks on the nature of the reference in the external data. This can allow an adversary to open arbitrary files or connections, which may further lead to the adversary gaining access to information on the system that they would normally be unable to obtain.
Last updated
Overview
CAPEC-201 (Serialized Data External Linking) is a detailed-level attack pattern catalogued by MITRE in the Common Attack Pattern Enumeration and Classification (CAPEC). It describes a recurring method attackers use to exploit software weaknesses.
How the attack works
The phases an attacker typically follows.
- Step 1Explore
[Survey the target] Using a browser or an automated tool, an adversary records all instances of web services that process requests with serialized data.
- Use an automated tool to record all instances of URLs that process requests with serialized data.
- Use a browser to manually explore the website and analyze how the application processes serialized data requests.
- Step 2Exploit
[Craft malicious payload] The adversary crafts malicious data message that contains references to sensitive files.
- Step 3Exploit
[Launch an External Linking attack] Send the malicious crafted message containing the reference to a sensitive file to the target URL.
What the attacker needs
Prerequisites
- The target must follow external data references without validating the validity of the reference target.
Skills required
- Low skill: To send serialized data messages with maliciously crafted schema.
Resources required
- None: No specialized resources are required to execute this type of attack.
Consequences
What a successful CAPEC-201 attack can achieve.
Read Data
Affects: Confidentiality
How to mitigate it
Defenses that reduce the risk of CAPEC-201.
- Configure the serialized data processor to only retrieve external entities from trusted sources.
Examples
The following DTD would attempt to open the /dev/tty device: <!DOCTYPE doc [ <!ENTITY ent SYSTEM "file:///dev/tty"> ]> A malicious actor could use this crafted DTD to reveal sensitive information.
The following XML snippet would attempt to open the /etc/passwd file: <foo xmlns:xi="http://www.w3.org/2001/XInclude"> <xi:include parse="text" href="file:///etc/passwd"/></foo>
Frequently asked questions
Common questions about CAPEC-201.
- What is CAPEC-201?
- An adversary creates a serialized data file (e.g. XML, YAML, etc...) that contains an external data reference. Because serialized data parsers may not validate documents with external references, there may be no checks on the nature of the reference in the external data. This can allow an adversary to open arbitrary files or connections, which may further lead to the adversary gaining access to information on the system that they would normally be unable to obtain.
- How does a Serialized Data External Linking attack work?
- It typically unfolds over 3 phases. It begins with: [Survey the target] Using a browser or an automated tool, an adversary records all instances of web services that process requests with serialized data.
- How do you prevent CAPEC-201?
- Configure the serialized data processor to only retrieve external entities from trusted sources.
- What weaknesses does CAPEC-201 target?
- CAPEC-201 exploits one CWE weakness: CWE-829 (Inclusion of Functionality from Untrusted Control Sphere).
- How severe is CAPEC-201?
- MITRE rates CAPEC-201 as High severity with high likelihood of attack.
Sources
References
Attack-pattern data is sourced from the MITRE CAPEC catalog (v3.9). Weakness associations link to the corresponding CWE entries on RadicalNotion.AI.
Defend against CAPEC-201
Track the CVEs and weaknesses this technique exploits, with AI-written analysis and remediation steps.