XXE to SSRF and Cloud Metadata
Repurposing an XML parser’s entity resolver as a server-side request engine — reaching internal services, scanning ports, and lifting cloud instance-role credentials.
How it works
Any external entity whose URI uses a network scheme turns the parser into an SSRF primitive: the server, not the browser, issues the request (What is XXE injection?). This is the pivot that takes XXE from “read a local file” to “reach things not exposed to the internet.” Where the parser can’t declare a DOCTYPE, XInclude Attacks with an http:// href give the same request primitive.
Primary targets:
- Internal web/admin apps and APIs unreachable from outside.
- Cloud instance metadata —
http://169.254.169.254/for AWS IAM role credentials, GCP/Azure equivalents, and container metadata on link-local addresses. - Port/host enumeration via timing or error differentials (Hunting in the Dark - Blind XXE).
Relationship to the SSRF corpus: the escalation ladder and defenses are the same as Server-Side Request Forgery; the metadata specifics live in Cloud Metadata Service Exploitation and Local File Read via SSRF. XXE’s distinctive constraints are the parser’s limited scheme/method support (usually GET-only over HTTP) and URL-character validation that mangles multi-line responses.
Reaching cloud credentials
The canonical chain: redirect an entity from a file:// path to http://169.254.169.254/latest/meta-data/..., then walk the metadata tree by appending path segments reflected in responses or errors, ending at iam/security-credentials/<role> to lift temporary IAM credentials and inherit the instance role’s privileges (XXE for SSRF: EC2 IAM Credentials, Exploiting XXE to Perform SSRF). Because the HTTP entity is typically GET-only, this works against IMDSv1 but not an IMDSv2-enforced host, which requires a PUT + token header the plain entity can’t send — see IMDSv2 for which SSRF primitives satisfy the token flow. The blind variant feeds the metadata response out-of-band (Blind XXE, XXE to SSRF and Cloud Metadata via error channel in Error-Based XXE).
Beyond HTTP: raw-protocol reach
HTTP entities only speak GET, which blocks services with their own wire protocols. gopher:// (old Java) and FTP let an XXE write arbitrary bytes to a TCP socket — the route to Redis, Memcached and SMTP. One researcher reached an unauthenticated internal Redis on 6379 over gopher://, ran INFO/SCAN without AUTH, and dumped session data — escalating a $1,000 file-read into a $10,000 critical (Limited XXE to Critical Redis). The Perl/LWP Gopher handler’s read-to-EOF behavior vs Redis keeping the socket open was the subtle timing clue there.
Internal pivoting past egress filters
When the parsing host itself can’t egress, route through an internal app that can. Honoki proxied OOB fetches through an internal Confluence makeRequest/consumerUri gadget to bypass the parser’s firewall, then used Java’s URL-scheme quirks (directory listing on a path) to confirm read-as-root (Blind XXE to Root-Level File Read).
Notable cases
- CVE-2026-20320 Cisco BroadWorks — unauth XXE used in “Operation Snowball” to exfiltrate the system-identity private key, enabling lateral movement (CISA KEV Cisco BroadWorks).
- openEQUELLA (CVE-2026-66089 / SOAP) — authenticated XXE reaching arbitrary files and internal HTTP resources, including cloud metadata, via REST/SOAP (openEQUELLA Metadata-Field XXE).
- IBM Business Automation Workflow (CVE-2025-13096) — classified under CWE-918 (SSRF), the parser issues server-side requests (IBM BAW XXE/SSRF).
- ArubaOS 8.13.2 — pre-auth XXE → OOB SSRF proxying probes to internal services; notable as a disputed report (closed “theoretical” despite packet captures and internal port-scan results) (Pre-auth XXE → SSRF on ArubaOS).
Related
- XML External Entity Injection
- Server-Side Request Forgery
- Cloud Metadata Service Exploitation
- Local File Read via SSRF
- IMDSv2
- Blind XXE
- Gopher Protocol SSRF
Sources
- Exploiting XXE for SSRF: EC2 IAM Credentials · original
- Exploiting XXE to Perform SSRF · original
- Exploiting XXE to Perform SSRF (walkthrough) · original
- From $1,000 to $10,000: Limited XXE to Critical Redis · original
- From Blind XXE to Root-Level File Read · original
- CISA KEV: Cisco BroadWorks XXE · original
- openEQUELLA XXE in Metadata Field · original
- IBM Business Automation Workflow XXE · original
- Pre-auth XXE → SSRF on ArubaOS 8.13.2 · original
- Hunting in the Dark - Blind XXE · original