Skip to content
XXE Disclosed report Advanced

XML External Entity (XXE) Injection via Regex Bypass in CMR AQL Parsing Enables SSRF, Service Enumeration, and Blind File Reads

A regex used to strip DOCTYPE declarations from XML input did not match across newlines, so a multi-line DOCTYPE slipped past the filter and reached an XML parser that processed external entities. An attacker could then make the server fetch external resources, read files blindly, enumerate internal services and cause delays.

dewankpant Follow

Originally disclosed on Bugcrowd

Critical View original
  • Accepted in 4 days
  • Fixed in 30 days
  • Disclosed after 44 days

Summary by dewankpant

XXE Injection via Regex Bypass in NASA CMR AQL Endpoint

Severity: Critical (CVSS 9.1)

Status: Patched

Researcher: Dewank Pant (dewankpant)

Recognized by: NASA VDP Letter of Recognition, March 11, 2026

Overview

A critical XML External Entity (XXE) Injection vulnerability was identified in NASA's Common Metadata Repository (CMR), affecting the publicly accessible AQL search endpoint (POST /search/concepts/search). The vulnerability stemmed from an insufficient regex-based DOCTYPE sanitization that failed to match multi-line DOCTYPE declarations, allowing complete bypass of the input filter.

Impact

Successful exploitation enabled:

  • Server-Side Request Forgery (SSRF) confirmed via outbound HTTP callbacks from NASA production infrastructure
  • Out-of-band data exfiltration via external DTD parameter entities, with confirmed extraction of AWS Account ID, ECS cluster ARN, internal EC2 hostnames, kernel version, and container metadata from the production environment
  • Blind file system enumeration via HTTP response code differential oracle
  • Internal service enumeration via timing and response code differentials
  • Denial of Service via 75-second timeout multiplication per entity reference

Root Cause

The sanitization function in common-lib/src/cmr/common/xml.clj applied the regex #"<!DOCTYPE.*?>" which does not match newline characters by default in Java regex. Multi-line DOCTYPE declarations bypassed the filter entirely, reaching the clojure.data.xml/parse-str parser which had external entity processing enabled by default.

Resolution

Fixed in: https://github.com/nasa/Common-Metadata-Repository/pull/2378

Reported through NASA VDP via Bugcrowd. Vulnerability triaged, confirmed, and resolved by the NASA security team.

The original report as published on Bugcrowd, by dewankpant. Images and videos are our own copies; raw HTML is shown as text. View it on Bugcrowd.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the DOCTYPE sanitisation regex did not match newline characters, so multi-line declarations bypassed it and reached a parser with external entity processing left on.

Impact

An attacker could trigger outbound requests from production infrastructure, extract environment metadata out of band, probe the file system and internal services through response differences, and cause delays; the text does not say whether any defence limited this.

What the attacker needed

Access to the public AQL search endpoint

The fix

The issue was fixed by the maintainers, as shown by the merged pull request referenced in the report.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

XML files can declare 'entities', which are shortcuts that the parser replaces with other content, and those replacements can point at files or web addresses. If a server parses XML from a user without switching this feature off, the attacker can make the server fetch or read things it should not. Here a filter meant to block those declarations only worked on single-line input, so a declaration split over several lines got through.

What is XXE?

An XML parser resolves entities the attacker defines, reading local files or making the server send requests.

More from National Aeronautics and Space Administration (NASA) - Vulnerability Disclosure Program

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

XML external entities (XXE)

The lesson behind this report.

An XML parser resolves entities the attacker defines, reading local files or making the server send requests.