# CVE-2025-27136: LocalS3 CreateBucketConfiguration Endpoint XML External Entity (XXE) Injection

> An attacker can exploit XXE in LocalS3 to perform SSRF and read internal data by sending crafted XML during bucket creation.

- **Severity:** Medium 5.5 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Mar 2025
- **Updated:** 10 Mar 2025
- **Also known as:** GHSA-g6wm-2v64-wq36

## What is CVE-2025-27136?

CVE-2025-27136 is a medium-severity vulnerability in Robothy local-s3, published on 10 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

LocalS3 is an Amazon S3 mock service for testing and local development. Prior to version 1.21, 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. The attacker only needs to be able to send HTTP requests to the LocalS3 service to exploit this vulnerability.

Weakness: CWE-611 (Improper Restriction of XML External Entity Reference)

## Which versions are affected by CVE-2025-27136?

2 open source packages ship an affected version, including io.github.robothy:local-s3-rest.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `io.github.robothy:local-s3-rest` | Maven | All versions | 1.21 |
| `io.github.robothy:local-s3-rest` | Maven | All versions | 1.21 |

## How do I fix CVE-2025-27136?

Upgrade io.github.robothy:local-s3-rest to 1.21 or later.

## Is CVE-2025-27136 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-27136 exists.

Public exploit code:

- Proof of Concept for CVE-2025-27136 (XXE in Local-S3) (github_poc): https://github.com/ZaidMkh32/CVE-2025-27136-XXE-LocalS3
- XML External Entity PoC in an S3. (github_poc): https://github.com/IssaBoudin/CVE-2025-27136

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-27136 and fix it if it is affected.

What it is: CVE-2025-27136 is a medium-severity vulnerability in Robothy local-s3, published on 10 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-27136 exists.

Affected packages and fixed versions:
- io.github.robothy:local-s3-rest (Maven): affected all versions; fixed in 1.21
- io.github.robothy:local-s3-rest (Maven): affected all versions; fixed in 1.21

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-27136/ (Markdown: https://insights.sbomify.com/CVE-2025-27136/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-27136
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-27136
- OSV: https://osv.dev/vulnerability/CVE-2025-27136

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-27136/
Summaries are generated and may contain mistakes; the official description above is the record.
