{"id":"CVE-2025-27136","aliases":["CVE-2025-27136","GHSA-g6wm-2v64-wq36"],"related":[],"kind":"vulnerability","state":"published","title":"LocalS3 CreateBucketConfiguration Endpoint XML External Entity (XXE) Injection","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"LocalS3 es un servicio simulado de Amazon S3 para pruebas y desarrollo local. Antes de la versión 1.21, el endpoint de creación de buckets del servicio LocalS3 es vulnerable a la inyección de entidades externas XML (XXE). Al procesar el documento XML CreateBucketConfiguration durante la creación de buckets, el analizador XML del servicio se configura para resolver entidades externas. Esto permite que un atacante declare una entidad externa que hace referencia a una URL interna, que el servidor intentará obtener al analizar el XML. La vulnerabilidad se produce específicamente en el procesamiento de restricciones de ubicación, donde el analizador XML resuelve entidades externas sin la validación o las restricciones adecuadas. Cuando se resuelve la entidad externa, el servidor realiza una solicitud HTTP a la URL especificada e incluye el contenido de la respuesta en el documento XML analizado. Esta vulnerabilidad se puede explotar para realizar ataques de server-side request forgery (SSRF), lo que permite que un atacante realice solicitudes a servicios o recursos internos que no deberían ser accesibles desde redes externas. El servidor incluirá las respuestas de estas solicitudes internas en la configuración de bucket resultante, lo que filtra información confidencial de manera efectiva. El atacante sólo necesita poder enviar solicitudes HTTP al servicio LocalS3 para explotar esta vulnerabilidad.","source":"nvd"}],"published":"2025-03-10T18:24:35.000Z","modified":"2026-06-17T09:03:04.770Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"}],"cwes":["CWE-611"],"affected":[{"ranges":[{"version":"< 1.21","status":"affected"}],"vendor":"Robothy","product":"local-s3","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.21"}],"ecosystem":"Maven","package":"io.github.robothy:local-s3-rest","purl":"pkg:maven/io.github.robothy/local-s3-rest","source":"ghsa"}],"references":[{"url":"https://github.com/Robothy/local-s3/security/advisories/GHSA-g6wm-2v64-wq36","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/Robothy/local-s3/commit/d6ed756ceb30c1eb9d4263321ac683d734f8836f","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-27136","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/Robothy/local-s3","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-03-10T19:08:39.045Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-27136","url":"https://www.cve.org/CVERecord?id=CVE-2025-27136","licence":"CVE Terms of Use","modified":"2025-03-10T19:09:21.238Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-g6wm-2v64-wq36","url":"https://github.com/advisories/GHSA-g6wm-2v64-wq36","licence":"CC-BY-4.0","modified":"2025-03-14T21:20:31.621Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-27136","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-27136","licence":"Public domain","modified":"2026-06-17T09:03:04.770Z"}],"updatedAt":"2026-11-25T22:58:55.089Z","epss":{"score":0.00533,"percentile":0.46468,"date":"2026-12-02T12:00:21.000Z"}}