GHSA-v232-254c-m6p7: Local s3 rest LocalS3 Project Vulnerable To XML Vulnerability
MODERATEGHSA-v232-254c-m6p7 is a MODERATE locals3 project vulnerable to xml vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Local s3 rest libraries in the Maven ecosystem. The issue involves locals3 project vulnerable to xml external entity (xxe) injection via bucket tagging api. Remediation is available by upgrading affected packages to version 1.21.
GHSA-v232-254c-m6p7 at a Glance
How to Fix GHSA-v232-254c-m6p7
To remediate this vulnerability, upgrade all affected Local s3 rest dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>io.github.robothy</groupId>
<artifactId>local-s3-rest</artifactId>
<version>1.21</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=io.github.robothy
How to Check if You Are Affected
To determine whether your Java application is affected by GHSA-v232-254c-m6p7, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=io.github.robothy
Analyze the terminal output to locate any version of Local s3 rest in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.21), your application is affected.
Note: The mvn dependency:tree -Dincludes=io.github.robothy command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Local s3 rest, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-v232-254c-m6p7 Affected Local s3 rest Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
io.github.robothy:local-s3-rest
|
Maven |
< 1.21
|
1.21
|
References
Frequently Asked Questions
What is GHSA-v232-254c-m6p7?
Which Local s3 rest versions are affected?
What version fixes GHSA-v232-254c-m6p7?
Is local-s3-rest affected?
What CWE is associated with GHSA-v232-254c-m6p7?
How can I check Maven dependencies for GHSA-v232-254c-m6p7?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v232-254c-m6p7",
"modified" : "2025-03-10T18:29:27Z",
"published" : "2025-03-10T18:29:27Z",
"aliases" : [ ],
"summary" : "LocalS3 Project Vulnerable to XML External Entity (XXE) Injection via Bucket Tagging API",
"details" : "## Description\nThe LocalS3 project, an S3-compatible storage service, is vulnerable to XML External Entity (XXE) injection through its bucket tagging API. The vulnerability exists because the application processes XML input without properly disabling external entity resolution.\n\nWhen processing XML data for bucket tagging operations, the application allows the definition and resolution of external entities. This vulnerability allows an attacker to read arbitrary files from the server's filesystem by defining an external entity that references local files.\n\nThe vulnerability is particularly severe because it allows direct access to sensitive files on the server's filesystem, bypassing any intended access controls. The XXE vulnerability can be exploited to read any file that the application process has access to, potentially exposing sensitive configuration files, credentials, or other confidential information.\n\n## Steps to Reproduce\n1. Create a bucket in the LocalS3 service using any S3 client (e.g., AWS CLI, boto3)\n2. Send a PUT request to the bucket tagging endpoint with the following XML payload:\n ```xml\n <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <!DOCTYPE data [\n <!ENTITY xxe SYSTEM \"file:///flag.txt\" >\n ]>\n <Tagging><TagSet><Tag><Key>xxe</Key><Value>&xxe;</Value></Tag></TagSet></Tagging>\n ```\n\n ```\n curl -X PUT \\\n -H \"Host: app\" \\\n -H \"Authorization: AWS dummy:dummy\" \\\n -H \"Content-Type: application/xml\" \\\n --data-binary @xxe.xml \\\n http://app/bucket?tagging\n ```\n\n3. Retrieve the bucket tags using a GET request to the same endpoint\n\n ```\n curl -H \"Authorization: AWS dummy:dummy\" http://app-1/bucket?tagging\n ```\n\n4. The content of the targeted file will be returned in the tag value\n\nThe successful exploitation of this vulnerability results in the contents of sensitive files being disclosed through the XML response, demonstrating the ability to read arbitrary files from the server's filesystem.\n\n## Mitigations\n- Disable XML external entity resolution in the XML parser configuration\n- Implement proper XML parsing security controls such as disabling DTD processing altogether\n- Use a safe parser configuration that doesn't process external entities or DTDs by default\n- Validate and sanitize all XML input before processing to prevent injection of malicious entities\n\n## Impact\nCritical severity vulnerability allowing unauthenticated attackers to read arbitrary files from the server's filesystem. This can lead to exposure of sensitive information, configuration files, and system data, potentially enabling further attacks against the system. The impact is heightened by the fact that the vulnerability requires minimal technical knowledge to exploit and can be triggered through standard S3 API operations.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "io.github.robothy:local-s3-rest"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.21"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Robothy/local-s3/security/advisories/GHSA-v232-254c-m6p7"
}, {
"type" : "WEB",
"url" : "https://github.com/Robothy/local-s3/commit/d6ed756ceb30c1eb9d4263321ac683d734f8836f"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Robothy/local-s3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-611" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-03-10T18:29:27Z",
"nvd_published_at" : null
}
}