{"id":"CVE-2025-27610","aliases":["CVE-2025-27610","GHSA-7wqh-767x-r66v"],"related":[],"kind":"vulnerability","state":"published","title":"Local File Inclusion in Rack::Static","summary":"Rack provides an interface for developing web applications in Ruby. Prior to versions 2.2.13, 3.0.14, and 3.1.12, `Rack::Static` can serve files under the specified `root:` even if `urls:` are provided, which may expose other files under the specified `root:` unexpectedly. The vulnerability occurs because `Rack::Static` does not properly sanitize user-supplied paths before serving files. Specifically, encoded path traversal sequences are not correctly validated, allowing attackers to access files outside the designated static file directory. By exploiting this vulnerability, an attacker can gain access to all files under the specified `root:` directory, provided they are able to determine then path of the file. Versions 2.2.13, 3.0.14, and 3.1.12 contain a patch for the issue. Other mitigations include removing usage of `Rack::Static`, or ensuring that `root:` points at a directory path which only contains files which should be accessed publicly. It is likely that a CDN or similar static file server would also mitigate the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Rack provides an interface for developing web applications in Ruby. Prior to versions 2.2.13, 3.0.14, and 3.1.12, `Rack::Static` can serve files under the specified `root:` even if `urls:` are provided, which may expose other files under the specified `root:` unexpectedly. The vulnerability occurs because `Rack::Static` does not properly sanitize user-supplied paths before serving files. Specifically, encoded path traversal sequences are not correctly validated, allowing attackers to access files outside the designated static file directory. By exploiting this vulnerability, an attacker can gain access to all files under the specified `root:` directory, provided they are able to determine then path of the file. Versions 2.2.13, 3.0.14, and 3.1.12 contain a patch for the issue. Other mitigations include removing usage of `Rack::Static`, or ensuring that `root:` points at a directory path which only contains files which should be accessed publicly. It is likely that a CDN or similar static file server would also mitigate the issue.","source":"cvelist"},{"lang":"en","text":"## Summary\n\n`Rack::Static` can serve files under the specified `root:` even if `urls:` are provided, which may expose other files under the specified `root:` unexpectedly.\n\n## Details\n\nThe vulnerability occurs because `Rack::Static` does not properly sanitize user-supplied paths before serving files. Specifically, encoded path traversal sequences are not correctly validated, allowing attackers to access files outside the designated static file directory.\n\n## Impact\n\nBy exploiting this vulnerability, an attacker can gain access to all files under the specified `root:` directory, provided they are able to determine then path of the file.\n\n## Mitigation\n\n- Update to the latest version of Rack, or\n- Remove usage of `Rack::Static`, or\n- Ensure that `root:` points at a directory path which only contains files which should be accessed publicly.\n\nIt is likely that a CDN or similar static file server would also mitigate the issue.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Rack proporciona una interfaz para desarrollar aplicaciones web en Ruby. Antes de las versiones 2.2.13, 3.0.14 y 3.1.12, `Rack::Static` puede servir archivos bajo el `root:` especificado incluso si se proporcionan `urls:`, lo que puede exponer otros archivos bajo el `root:` especificado de forma inesperada. La vulnerabilidad se produce porque `Rack::Static` no depura correctamente las rutas proporcionadas por el usuario antes de servir los archivos. En concreto, las secuencias de path traversal codificadas no se validan correctamente, lo que permite a los atacantes acceder a archivos fuera del directorio de archivos estáticos designado. Al explotar esta vulnerabilidad, un atacante puede obtener acceso a todos los archivos bajo el directorio `root:` especificado, siempre que pueda determinar la ruta del archivo. Las versiones 2.2.13, 3.0.14 y 3.1.12 contienen un parche para el problema. Otras medidas de mitigación incluyen eliminar el uso de `Rack::Static` o garantizar que `root:` apunte a una ruta de directorio que solo contenga archivos a los que se debe acceder de forma pública. Es probable que una CDN o un servidor de archivos estáticos similar también mitigue el problema.","source":"nvd"}],"published":"2025-03-10T22:19:25.982Z","modified":"2026-09-10T03:49:48.459Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-23"],"affected":[{"ranges":[{"version":"< 2.2.13","status":"affected"},{"version":">= 3.0, < 3.0.14","status":"affected"},{"version":">= 3.1, < 3.1.12","status":"affected"}],"vendor":"rack","product":"rack","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.2.13"}],"ecosystem":"RubyGems","package":"rack","purl":"pkg:gem/rack","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.0","status":"affected","fixed":"3.0.14"}],"ecosystem":"RubyGems","package":"rack","purl":"pkg:gem/rack","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.1","status":"affected","fixed":"3.1.12"}],"ecosystem":"RubyGems","package":"rack","purl":"pkg:gem/rack","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.2.13"},{"status":"affected","introduced":"3.0.0","fixed":"3.0.14"},{"status":"affected","introduced":"3.1.0","fixed":"3.1.12"}],"vendor":"rack","product":"rack","cpe":"cpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:*","source":"nvd"}],"references":[{"url":"https://github.com/rack/rack/security/advisories/GHSA-7wqh-767x-r66v","tags":["mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rack/rack/commit/50caab74fa01ee8f5dbdee7bb2782126d20c6583","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00016.html","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-27610","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/rack/rack","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2025-27610.yml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2025-03-11T15:22:45.488Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-27610","url":"https://www.cve.org/CVERecord?id=CVE-2025-27610","licence":"CVE Terms of Use","modified":"2025-11-03T21:13:28.086Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7wqh-767x-r66v","url":"https://github.com/advisories/GHSA-7wqh-767x-r66v","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:48.459Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-27610","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-27610","licence":"Public domain","modified":"2026-06-17T09:03:54.450Z"}],"updatedAt":"2026-11-25T22:58:55.093Z","epss":{"score":0.01173,"percentile":0.68391,"date":"2026-12-01T12:00:22.000Z"}}