Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
💎
💎 RubyGems
Not in CISA KEV
LOW severity

GHSA-22h5-pq3x-2gf2 uri

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.

URI allows for userinfo Leakage in URI#join, URI#merge, and URI#+

Also known asCVE-2025-27221
Published
Mar 3, 2025
Updated
Sep 10, 2026
Affected
4 pkgs
Patched
4 / 4
Exploits
None indexed
Exploitation data as of Sep 21, 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 CVEs42th percentile — riskier than 42% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

How urgent is this, really

GHSA-22h5-pq3x-2gf2 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.

Where this sits among everything scored

Of 377,636 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.

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
💎RubyGemsuri0.12.0&&< 0.12.40.12.4bundle update uri --conservative
💎RubyGemsuri0.13.0&&< 0.13.20.13.2bundle update uri --conservative
💎RubyGemsuri1.0.0&&< 1.0.31.0.3bundle update uri --conservative

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.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-22h5-pq3x-2gf2 can be triaged on real exposure rather than presence alone.

Tailored to GHSA-22h5-pq3x-2gf2. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

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?

O3 Security finds GHSA-22h5-pq3x-2gf2 across RubyGems dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

GHSA-22h5-pq3x-2gf2: uri (Low 3.2) | O3 Security