NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
💎
💎 RubyGems
Not in CISA KEV
LOW severity

URI allows for userinfo Leakage in URI#join, URI#merge, and URI#+GHSA-22h5-pq3x-2gf2

LOWFix: ruby/uri#154

GHSA-22h5-pq3x-2gf2 is a low-severity (CVSS 3.2) CWE-212 vulnerability in uri. A fix is available for uri — see the affected versions and patch details below.

Also known asCVE-2025-27221
Published
Updated
Affected
4 pkgs
Patched
4 / 4
Exploits
None indexed
Exploitation data as of Nov 2, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-22h5-pq3x-2gf2.

EPSS Exploitation Probability

via FIRST.org ↗
0.5%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs44th percentile — riskier than 44% of all scored CVEsHighest risk
0.00%0.34%0.67%1.01%0.2%0.5%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

4 pkgs affected
💎uri💎uri💎uri💎uri

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.

Description

There is a possibility for userinfo leakage by in the uri gem. This vulnerability has been assigned the CVE identifier CVE-2025-27221. We recommend upgrading the uri gem.

Details

The methods URI#join, URI#merge, and URI#+ retained userinfo, such as user:password, even after the host is replaced. When generating a URL to a malicious host from a URL containing secret userinfo using these methods, and having someone access that URL, an unintended userinfo leak could occur.

Please update URI gem to version 0.11.3, 0.12.4, 0.13.2, 1.0.3 or later.

Affected versions

uri gem versions < 0.11.3, 0.12.0 to 0.12.3, 0.13.0, 0.13.1 and 1.0.0 to 1.0.2.

Credits

Thanks to Tsubasa Irisawa (lambdasawa) for discovering this issue. Also thanks to nobu for additional fixes of this vulnerability.

Affected Packages

4 total 4 fixed
EcosystemPackageVulnerable rangeFix
💎RubyGemsuriall versions0.11.3bundle update uri --conservative
💎RubyGemsuri≥ 0.12.0&&< 0.12.40.12.4bundle update uri --conservative
💎RubyGemsuri≥ 0.13.0&&< 0.13.20.13.2bundle update uri --conservative
💎RubyGemsuri≥ 1.0.0&&< 1.0.31.0.3bundle update uri --conservative

Affected Products

1 product · 4 configurations
Application
uriruby-lang
≥ 1.0.0 && < 1.0.3
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for uri, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update uri to 0.11.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-22h5-pq3x-2gf2 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatLow
ProductFixed inAdvisory
Red Hat Enterprise Linux 10ruby-0:3.3.8-10.el10_0RHSA-2025:8131
Red Hat Enterprise Linux 8ruby:3.3-8100020250414172630.489197e6RHSA-2025:10217
Red Hat Enterprise Linux 8ruby:3.1-8100020250407112943.489197e6RHSA-2025:4063
Red Hat Enterprise Linux 9ruby:3.1-9050020250404144903.9RHSA-2025:4488
Red Hat Enterprise Linux 9ruby:3.3-9050020250415095239.9RHSA-2025:4493

Frequently Asked Questions

There is a possibility for userinfo leakage by in the uri gem. This vulnerability has been assigned the CVE identifier CVE-2025-27221. We recommend upgrading the uri gem. ## Details The methods `URI#join`, `URI#merge`, and `URI#+` retained userinfo, such as `user:password`, even after the host is replaced. When generating a URL to a malicious host from a URL containing secret userinfo using these methods, and having someone access that URL, an unintended userinfo leak could occur. Please update URI gem to version 0.11.3, 0.12.4, 0.13.2, 1.0.3 or later. ## Affected versions uri gem version
O3 Security · Impact-Aware SCA

Is GHSA-22h5-pq3x-2gf2 in your dependencies?

Find it across RubyGems, including transitive dependencies.

URI allows for userinfo Leakage in URI#join, URI#merge,…