🛡️ CVE-2025-27136 — local-s3-rest
Description
LocalS3 CreateBucketConfiguration Endpoint XML External Entity (XXE) Injection
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.
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. Rated impact: confidentiality none, integrity none, availability none.
Weakness class
CVE-2025-27136 is classified as CWE-611: XML External Entity Reference (XXE). An XML parser resolves external entities, letting a crafted document read local files or reach internal services.
Affected software
CVE-2025-27136 is recorded against 2 packages.
- io.github.robothy:local-s3-rest (fixed in 1.21)
- unknown
Timeline and source
Published on 10 March 2025 and last revised on 14 March 2025. No public exploit is currently recorded for this entry. Record sourced from NVD.
References
github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Package)
Details
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 Packages
| Software | From version | Fixed in |
|---|---|---|
| io.github.robothy:local-s3-rest | — | 1.21 |
| unknown | — | — |
References
Similar Threats
- Unknown GHSA-2466-4485-4pxj
- Unknown GHSA-47qw-ccjm-9c2c
- Unknown GHSA-v232-254c-m6p7
More CVE 2025 advisories
Browse all of CVE 2025 in the advisory index.
Free Vulnerability Check
Is your site affected by CVE-2025-27136?
BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against CVE-2025-27136 and other known CVE records.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.