CVE-2025-61780
Full vulnerability record from the local CVENow database.
Description
Rack is a modular Ruby web server interface. Prior to versions 2.2.20, 3.1.18, and 3.2.3, a possible information disclosure vulnerability existed in `Rack::Sendfile` when running behind a proxy that supports `x-sendfile` headers (such as Nginx). Specially crafted headers could cause `Rack::Sendfile` to miscommunicate with the proxy and trigger unintended internal requests, potentially bypassing proxy-level access restrictions. When `Rack::Sendfile` received untrusted `x-sendfile-type` or `x-accel-mapping` headers from a client, it would interpret them as proxy configuration directives. This could cause the middleware to send a "redirect" response to the proxy, prompting it to reissue a new internal request that was not subject to the proxy's access controls. An attacker could exploit this by setting a crafted `x-sendfile-type: x-accel-redirect` header, setting a crafted `x-accel-mapping` header, and requesting a path that qualifies for proxy-based acceleration. Attackers could bypass proxy-enforced restrictions and access internal endpoints intended to be protected (such as administrative pages). The vulnerability did not allow arbitrary file reads but could expose sensitive application routes. This issue only affected systems meeting all of the following conditions: The application used `Rack::Sendfile` with a proxy that supports `x-accel-redirect` (e.g., Nginx); the proxy did **not** always set or remove the `x-sendfile-type` and `x-accel-mapping` headers; and the application exposed an endpoint that returned a body responding to `.to_path`. Users should upgrade to Rack versions 2.2.20, 3.1.18, or 3.2.3, which require explicit configuration to enable `x-accel-redirect`. Alternatively, configure the proxy to always set or strip the header, or in Rails applications, disable sendfile completely.
View original CVE JSON
{
"id": "CVE-2025-61780",
"sourceIdentifier": "[email protected]",
"published": "2025-10-10T17:15:39.557",
"lastModified": "2026-10-19T22:10:00.130",
"vulnStatus": "Analyzed",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "Rack is a modular Ruby web server interface. Prior to versions 2.2.20, 3.1.18, and 3.2.3, a possible information disclosure vulnerability existed in `Rack::Sendfile` when running behind a proxy that supports `x-sendfile` headers (such as Nginx). Specially crafted headers could cause `Rack::Sendfile` to miscommunicate with the proxy and trigger unintended internal requests, potentially bypassing proxy-level access restrictions. When `Rack::Sendfile` received untrusted `x-sendfile-type` or `x-accel-mapping` headers from a client, it would interpret them as proxy configuration directives. This could cause the middleware to send a \"redirect\" response to the proxy, prompting it to reissue a new internal request that was not subject to the proxy's access controls. An attacker could exploit this by setting a crafted `x-sendfile-type: x-accel-redirect` header, setting a crafted `x-accel-mapping` header, and requesting a path that qualifies for proxy-based acceleration. Attackers could bypass proxy-enforced restrictions and access internal endpoints intended to be protected (such as administrative pages). The vulnerability did not allow arbitrary file reads but could expose sensitive application routes. This issue only affected systems meeting all of the following conditions: The application used `Rack::Sendfile` with a proxy that supports `x-accel-redirect` (e.g., Nginx); the proxy did **not** always set or remove the `x-sendfile-type` and `x-accel-mapping` headers; and the application exposed an endpoint that returned a body responding to `.to_path`. Users should upgrade to Rack versions 2.2.20, 3.1.18, or 3.2.3, which require explicit configuration to enable `x-accel-redirect`. Alternatively, configure the proxy to always set or strip the header, or in Rails applications, disable sendfile completely."
},
{
"lang": "es",
"value": "Rack es una interfaz modular de servidor web Ruby. Versiones anteriores a la 2.2.20, 3.1.18 y 3.2.3, existía una posible vulnerabilidad de revelación de información en ’Rack::Sendfile’ al ejecutarse detrás de un proxy que soporta cabeceras ’x-sendfile’ (como Nginx). Cabeceras especialmente manipuladas podrían causar que ’Rack::Sendfile’ se comunicara erróneamente con el proxy y desencadenara solicitudes internas no intencionadas, eludiendo potencialmente las restricciones de acceso a nivel de proxy. Cuando ’Rack::Sendfile’ recibía cabeceras ’x-sendfile-type’ o ’x-accel-mapping’ no confiables de un cliente, las interpretaba como directivas de configuración del proxy. Esto podría causar que el middleware enviara una respuesta de ’redirect’ al proxy, lo que lo impulsaría a reemitir una nueva solicitud interna que no estaba sujeta a los controles de acceso del proxy. Un atacante podría explotar esto configurando una cabecera ’x-sendfile-type: x-accel-redirect’ manipulada, configurando una cabecera ’x-accel-mapping’ manipulada y solicitando una ruta que califique para la aceleración basada en proxy. Los atacantes podrían eludir las restricciones impuestas por el proxy y acceder a endpoints internos destinados a ser protegidos (como páginas administrativas). La vulnerabilidad no permitía lecturas arbitrarias de archivos, pero podría exponer rutas sensibles de la aplicación. Este problema solo afectaba a sistemas que cumplían todas las siguientes condiciones: La aplicación utilizaba ’Rack::Sendfile’ con un proxy que soporta ’x-accel-redirect’ (por ejemplo, Nginx); el proxy no siempre establecía o eliminaba las cabeceras ’x-sendfile-type’ y ’x-accel-mapping’; y la aplicación exponía un endpoint que devolvía un cuerpo que respondía a ’.to_path’. Los usuarios deberían actualizar a las versiones de Rack 2.2.20, 3.1.18 o 3.2.3, que requieren configuración explícita para habilitar ’x-accel-redirect’. Alternativamente, configure el proxy para que siempre establezca o elimine la cabecera, o en aplicaciones Rails, deshabilite sendfile por completo."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "rack",
"product": "rack",
"versions": [
{
"version": "< 2.2.20",
"status": "affected"
},
{
"version": ">= 3.0, < 3.1.18",
"status": "affected"
},
{
"version": ">= 3.2, < 3.2.3",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "[email protected]",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N",
"baseScore": 5.8,
"baseSeverity": "MEDIUM",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "CHANGED",
"confidentialityImpact": "LOW",
"integrityImpact": "NONE",
"availabilityImpact": "NONE"
},
"exploitabilityScore": 3.9,
"impactScore": 1.4
},
{
"source": "[email protected]",
"type": "Primary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
"baseScore": 5.3,
"baseSeverity": "MEDIUM",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "LOW",
"integrityImpact": "NONE",
"availabilityImpact": "NONE"
},
"exploitabilityScore": 3.9,
"impactScore": 1.4
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2025-10-10T20:34:55.399317Z",
"id": "CVE-2025-61780",
"options": [
{
"exploitation": "none"
},
{
"automatable": "yes"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-200"
},
{
"lang": "en",
"value": "CWE-441"
},
{
"lang": "en",
"value": "CWE-913"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:*",
"versionEndExcluding": "2.2.20",
"matchCriteriaId": "2077D030-4BE1-4CB4-8C9B-ACCA0B01BB0D"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:*",
"versionStartIncluding": "3.0.0",
"versionEndExcluding": "3.1.18",
"matchCriteriaId": "52554FFF-7EF2-473A-8686-6D029CC8F6EF"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:*",
"versionStartIncluding": "3.2.0",
"versionEndExcluding": "3.2.3",
"matchCriteriaId": "AA3F6ADB-DBDD-4C26-A019-D5AE5961F3CC"
}
]
}
]
}
],
"references": [
{
"url": "https://github.com/rack/rack/commit/57277b7741581fa827472c5c666f6e6a33abd784",
"source": "[email protected]",
"tags": [
"Patch"
]
},
{
"url": "https://github.com/rack/rack/commit/7e69f65eefe9cd2868df9f9f3b0977b86f93523a",
"source": "[email protected]",
"tags": [
"Patch"
]
},
{
"url": "https://github.com/rack/rack/commit/fba2c8bc63eb787ff4b19bc612d315fda6126d85",
"source": "[email protected]",
"tags": [
"Patch"
]
},
{
"url": "https://github.com/rack/rack/security/advisories/GHSA-r657-rxjc-j557",
"source": "[email protected]",
"tags": [
"Mitigation",
"Vendor Advisory"
]
}
]
}