cve.bz

CVE-2026-107399 sparklemotion mechanize: Insufficiently Protected Credentials

6.8 mediumEPSS 0.4%Fix available

Medium (6.8) in sparklemotion mechanize. EPSS 0.4% estimated probability of exploitation activity in the next 30 days. Fixed in mechanize 2.14.1.

On this page
The Mechanize library is used for automating interaction with websites. Prior to 2.14.1, Mechanize applies no origin trust boundary in Mechanize::HTTP::Agent#response_follow_meta_refresh when Mechanize#follow_meta_refresh is enabled. A page containing a meta refresh to another origin causes headers configured through Mechanize#request_headers= to be reapplied to the refresh request, allowing an attacker who controls content in the crawl to capture bearer tokens or session cookies. The default configuration is not affected because follow_meta_refresh is false, and the exposure is limited to caller-supplied default headers. This issue is fixed in version 2.14.1.

Severity

CVSS 3.1

6.8 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 31st percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-10-14. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
CWE-522 Insufficiently Protected Credentials
OWASP Top 10
A01:2025 Broken Access Control, A06:2025 Insecure Design
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-107399 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-107399?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-107399?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-107399 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
sparklemotion mechanize< 2.15.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-c6rp-p8xm-4q9fRubyGemsmechanize<2.14.12.14.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13ruby-mechanizeno fix listedDEBIAN-CVE-2026-107399
Debian14ruby-mechanize2.14.1-1DEBIAN-CVE-2026-107399
Ubuntu22.04:LTS, 24.04:LTS, 26.04:LTS and 4 moreruby-mechanizeno fix listedUBUNTU-CVE-2026-107399

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

A moderate information disclosure flaw was found in the mechanize Ruby library, which is included in the Red Hat 3scale API Management Platform system container. When an application enables automatic meta refresh following (Mechanize#follow_meta_refresh, which is disabled by default) and configures default request headers through Mechanize#request_headers=, a crawled page containing a meta refresh pointing to another origin causes those configured headers to be reapplied to the cross-origin refresh request. A remote attacker who controls web content visited during a crawl can use this behavior to capture sensitive credentials, such as bearer tokens or session cookies, supplied in the default request headers. The default configuration is not affected, and the exposure is limited to caller-supplied default headers. Within Red Hat's product scope, only the 3scale API Management 2.15 stream is affected, and that stream is out of support scope, so no Red Hat update is planned for it; the residual risk is limited to deployments on that stream that enable meta refresh following while sending sensitive headers. Red Hat rates this flaw Moderate with a CVSS 3.1 score of 5.9 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N). The upstream CVE record scores the issue at 6.8 using a scope of changed (S:C); Red Hat assessed the scope as unchanged (S:U) because the mechanize client and the calling application operate within the same security authority.

Red Hat's mitigation

A workaround is available: keep automatic meta refresh following disabled by leaving Mechanize#follow_meta_refresh at its default value of false, which is the non-affected default configuration. If meta refresh following must be enabled, avoid configuring sensitive headers such as Authorization or Cookie via Mechanize#request_headers= so that they are not replayed to cross-origin refresh targets. The affected Red Hat 3scale API Management 2.15 stream is out of support scope, so no Red Hat update is planned for it; upstream fixed this issue in mechanize version 2.14.1.

ProductPackageStateAdvisory
Red Hat 3scale API Management Platform 23scale-amp2/system-rhel8Out of support scope

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-107399.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-522 (13), CWE-200 (59).

References

Check your stackJSON