CVE-2025-27136: Local s3 rest LocalS3 CreateBucketConfiguration Endpoint XML External Vulnerability

MODERATE
Advisory Identifier: GHSA-g6wm-2v64-wq36
CWE-611
Published
Advisory Summary

CVE-2025-27136 is a MODERATE locals3 createbucketconfiguration endpoint xml external vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Local s3 rest libraries in the Maven ecosystem. The issue involves locals3 createbucketconfiguration endpoint xml external entity (xxe) injection. Remediation is available by upgrading affected packages to version 1.21.

CVE-2025-27136 at a Glance

CVE Identifier CVE-2025-27136
GHSA Identifier GHSA-g6wm-2v64-wq36
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 CVE-2025-27136

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 CVE-2025-27136, 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 service's bucket creation endpoint is vulnerable to XML External Entity (XXE) injection. When processing the CreateBucketConfiguration XML document during bucket creation, the service's XML parser is configured to resolve external entities. This allows an attacker to declare an external entity that references an internal URL, which the server will then attempt to fetch when parsing the XML. The vulnerability specifically occurs in the location constraint processing, where the XML parser resolves external entities without proper validation or restrictions. When the external entity is resolved, the server makes an HTTP request to the specified URL and includes the response content in the parsed XML document. This vulnerability can be exploited to perform server-side request forgery (SSRF) attacks, allowing an attacker to make requests to internal services or resources that should not be accessible from external networks. The server will include the responses from these internal requests in the resulting bucket configuration, effectively leaking sensitive information. ## Steps to Reproduce 1. Create an XML document that includes an external entity declaration pointing to the internal target: ```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE test [ <!ENTITY xxe SYSTEM "http://internal-web/flag.txt"> ]> <CreateBucketConfiguration> <LocationConstraint>&xxe;</LocationConstraint> </CreateBucketConfiguration> ``` 2. Send a PUT request to create a new bucket with this configuration: ```bash curl -X PUT http://app/test-bucket-2 -H 'Content-Type: application/xml' -d @payload.xml ``` 3. Retrieve the bucket location to see the resolved entity content: ```bash curl http://app/test-bucket-2/?location ``` When these steps are executed, the server processes the XML, resolves the external entity by making a request to the internal URL, and includes the response in the bucket's location constraint. The attacker can then retrieve this information through the bucket location endpoint. ## Mitigations - Disable XML external entity resolution in the XML parser configuration. Most XML parsers have options to disable external entity processing. - Implement proper input validation for XML documents, rejecting those that contain DOCTYPE declarations or external entity references. - Use XML parsers that are configured securely by default and don't process external entities. - If external entity processing is required, implement a whitelist of allowed URLs and validate all URLs before making any requests. ## Impact The vulnerability allows unauthenticated attackers to make the server perform HTTP requests to internal networks and services, potentially exposing sensitive information or enabling further attacks against internal systems. The attacker only needs to be able to send HTTP requests to the LocalS3 service to exploit this vulnerability.

CVE-2025-27136 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 CVE-2025-27136?
CVE-2025-27136 is a security vulnerability in Local s3 rest involving LocalS3 CreateBucketConfiguration Endpoint 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 CVE-2025-27136?
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 CVE-2025-27136?
CVE-2025-27136 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 CVE-2025-27136?
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-g6wm-2v64-wq36",
  "modified" : "2025-03-14T20:29:09Z",
  "published" : "2025-03-10T18:24:35Z",
  "aliases" : [ "CVE-2025-27136" ],
  "summary" : "LocalS3 CreateBucketConfiguration Endpoint XML External Entity (XXE) Injection",
  "details" : "## Description\n\nThe LocalS3 service's bucket creation endpoint is vulnerable to XML External Entity (XXE) injection. When processing the CreateBucketConfiguration XML document during bucket creation, the service's XML parser is configured to resolve external entities. This allows an attacker to declare an external entity that references an internal URL, which the server will then attempt to fetch when parsing the XML.\n\nThe vulnerability specifically occurs in the location constraint processing, where the XML parser resolves external entities without proper validation or restrictions. When the external entity is resolved, the server makes an HTTP request to the specified URL and includes the response content in the parsed XML document.\n\nThis vulnerability can be exploited to perform server-side request forgery (SSRF) attacks, allowing an attacker to make requests to internal services or resources that should not be accessible from external networks. The server will include the responses from these internal requests in the resulting bucket configuration, effectively leaking sensitive information.\n\n## Steps to Reproduce\n\n1. Create an XML document that includes an external entity declaration pointing to the internal target:\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE test [ <!ENTITY xxe SYSTEM \"http://internal-web/flag.txt\"> ]>\n<CreateBucketConfiguration>\n    <LocationConstraint>&xxe;</LocationConstraint>\n</CreateBucketConfiguration>\n```\n\n2. Send a PUT request to create a new bucket with this configuration:\n```bash\ncurl -X PUT http://app/test-bucket-2 -H 'Content-Type: application/xml' -d @payload.xml\n```\n\n3. Retrieve the bucket location to see the resolved entity content:\n```bash\ncurl http://app/test-bucket-2/?location\n```\n\nWhen these steps are executed, the server processes the XML, resolves the external entity by making a request to the internal URL, and includes the response in the bucket's location constraint. The attacker can then retrieve this information through the bucket location endpoint.\n\n## Mitigations\n\n- Disable XML external entity resolution in the XML parser configuration. Most XML parsers have options to disable external entity processing.\n- Implement proper input validation for XML documents, rejecting those that contain DOCTYPE declarations or external entity references.\n- Use XML parsers that are configured securely by default and don't process external entities.\n- If external entity processing is required, implement a whitelist of allowed URLs and validate all URLs before making any requests.\n\n## Impact\n\nThe vulnerability allows unauthenticated attackers to make the server perform HTTP requests to internal networks and services, potentially exposing sensitive information or enabling further attacks against internal systems. The attacker only needs to be able to send HTTP requests to the LocalS3 service to exploit this vulnerability.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:P"
  } ],
  "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-g6wm-2v64-wq36"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-27136"
  }, {
    "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:24:35Z",
    "nvd_published_at" : "2025-03-10T19:15:40Z"
  }
}