llamaCVEVulnerability Intelligence
/
Advisory · GitHub · RubyGems · mechanize

GHSA-C6RP-P8XM-4Q9F

Mechanize sends credential headers to another origin after a meta refresh

Parche disponible
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -46 d de la divulgación
Exposición42 dDesde la divulgación, 8 oct 2026, 5:09 p. m.
Detección39 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche 2.14.1
Monitoreo
Detectada
23 ago 26
8 oct 26
17 nov 26
19 nov 26
23 ago 26
14 sept 26
6 oct 26
28 oct 26
19 nov 26
FechaFaseEventoDetalle
Remediación Parche 2.14.1 mechanize · -46 d desde divulgación
Divulgación Publicada GHSA-C6RP-P8XM-4Q9F divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

`mechanize` applied no trust boundary to a `meta` refresh, so credentials set through `Mechanize#request_headers=` followed a refresh that pointed at another origin.

Details

`Mechanize::HTTP::Agent#response_follow_meta_refresh` fetched the refresh target with no notion of a crossed origin, so `@request_headers` were re-applied in full. An attacker who could place a `meta` refresh in a page the agent fetched — through stored content, an open redirect, or control of any page in the crawl — collected the same credentials as through an HTTP redirect, on a code path that had none of the redirect path's protections.

The refresh fetch passes an empty per-request headers hash, so only headers set through `Mechanize#request_headers=` were exposed.

This requires `Mechanize#follow_meta_refresh = true`. It is `false` by default, so an agent in its default configuration is not affected. Crawlers commonly enable it.

Impact

An attacker who can place a `meta` refresh in any page the agent fetches captures bearer tokens and session cookies set through `request_headers=`. Disclosure only; no integrity or availability impact.

Patches

Fixed in `mechanize` v2.14.1. A `meta` refresh that points at another origin is now subject to the same rule as an HTTP redirect: credentials and cookies are withheld from the request that follows it.

Workarounds

Leave `Mechanize#follow_meta_refresh` at its default of `false`, or avoid `request_headers=` for credentials when it is enabled.

Versiones

Rangos afectados

Afectada Corregida Última
mechanize< 2.14.1
2.14.1
2.14.2
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
rubygemsmechanize
Corregida 2.14.1 -46 d 2.14.2 no afectada
Versiones corregidas2.14.1
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Otrahttps://github.com/sparklemotion/mechanize/security/advisories/GHSA-c6rp-p8xm-4q9f
Otrahttps://github.com/sparklemotion/mechanize/pull/676
Otrahttps://github.com/sparklemotion/mechanize/commit/02a1235842d6eda8d4a5a3d8f13aba2cecf52e4f
Otrahttps://github.com/sparklemotion/mechanize/commit/84c74df87d15f5d119df268ba6aa79bc1e16a2c3
Otrahttps://github.com/sparklemotion/mechanize
Otrahttps://github.com/sparklemotion/mechanize/releases/tag/v2.14.1

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.