p PatchFirst

CVE-2026-107399

CVE-2026-107399 · Mechanize sends credential headers to another origin after a meta refresh

CVSS 6.8 · Medium · EPSS 0.4% · Fix available

Compare with your installed version

Affected products and known fixed versions are public information. Compare them with your installed version.

Check the installed version:

dpkg-query -W -f='${source:Package} ${binary:Package} ${Version}\n' | awk '$1=="ruby-mechanize"'

Assess your server’s risks

The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.

Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.

curl -fsSL https://patchfirst.dev/check.sh | sh
Check your server for free →

Channels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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.

Published
Updated

Stack: system · ruby

Affected products and versions

  • mechanize

    Versions
    • < 2.15.0: Affected

    No fix published

  • ruby-mechanize Debian 12

    Versions
    • 2.10.1-1
    • 2.10.1-1.1
    • 2.14.0-1
    • 2.14.0-2
    • 2.14.1-1
    • 2.8.5-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ruby-mechanize Debian 13

    Versions
    • 2.10.1-1
    • 2.10.1-1.1
    • 2.14.0-1
    • 2.14.0-2
    • 2.14.1-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ruby-mechanize Debian 14

    Versions
    • 2.10.1-1
    • 2.10.1-1.1
    • 2.14.0-1
    • 2.14.0-2
    Affected ranges
    • ECOSYSTEM: < 2.14.1-1

    Update to 2.14.1-1

  • mechanize RubyGems

    Versions
    • 0.1.0
    • 0.1.1
    • 0.1.2
    • 0.1.3
    • 0.2.0
    • 0.2.1
    All versions (95)
    • 0.2.2
    • 0.2.3
    • 0.3.0
    • 0.3.1
    • 0.4.0
    • 0.4.1
    • 0.4.2
    • 0.4.3
    • 0.4.4
    • 0.4.5
    • 0.4.6
    • 0.4.7
    • 0.5.0
    • 0.5.1
    • 0.5.2
    • 0.5.3
    • 0.5.4
    • 0.6.0
    • 0.6.1
    • 0.6.10
    • 0.6.11
    • 0.6.2
    • 0.6.3
    • 0.6.4
    • 0.6.5
    • 0.6.6
    • 0.6.7
    • 0.6.8
    • 0.6.9
    • 0.7.0
    • 0.7.1
    • 0.7.2
    • 0.7.3
    • 0.7.4
    • 0.7.5
    • 0.7.6
    • 0.7.7
    • 0.7.8
    • 0.8.0
    • 0.8.1
    • 0.8.2
    • 0.8.3
    • 0.8.4
    • 0.8.5
    • 0.9.0
    • 0.9.1
    • 0.9.2
    • 0.9.3
    • 1.0.0
    • 1.0.1.beta.20110107104205
    • 2.0
    • 2.0.1
    • 2.0.pre.1
    • 2.0.pre.2
    • 2.1
    • 2.1.1
    • 2.1.pre.1
    • 2.10.0
    • 2.10.1
    • 2.11.0
    • 2.12.0
    • 2.12.1
    • 2.12.2
    • 2.13.0
    • 2.14.0
    • 2.2
    • 2.2.1
    • 2.3
    • 2.4
    • 2.5
    • 2.5.1
    • 2.6.0
    • 2.7.0
    • 2.7.1
    • 2.7.2
    • 2.7.3
    • 2.7.4
    • 2.7.5
    • 2.7.6
    • 2.7.7
    • 2.8.0
    • 2.8.1
    • 2.8.2
    • 2.8.3
    • 2.8.4
    • 2.8.5
    • 2.9.0
    • 2.9.1
    • 2.9.2
    Affected ranges
    • ECOSYSTEM: < 2.14.1

    Update to 2.14.1

  • ruby-mechanize Ubuntu Pro 16.04 LTS

    Versions
    • 2.7.3-1
    • 2.7.3-1ubuntu0.1~esm1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ruby-mechanize Ubuntu Pro 18.04 LTS

    Versions
    • 2.7.5-1
    • 2.7.5-2
    • 2.7.5-2ubuntu0.1~esm1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ruby-mechanize Ubuntu Pro 20.04 LTS

    Versions
    • 2.7.6-1
    • 2.7.6-1ubuntu0.1~esm1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ruby-mechanize Ubuntu 22.04 LTS

    Versions
    • 2.7.7-1
    • 2.7.7-3
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ruby-mechanize Ubuntu 24.04 LTS

    Versions
    • 2.8.5-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ruby-mechanize Ubuntu 26.10

    Versions
    • 2.10.1-1.1
    • 2.14.0-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ruby-mechanize Ubuntu 26.04 LTS

    Versions
    • 2.10.1-1.1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →