Skip to main content
CVE-2025-27221VulnerabilityPublished Updated

CVE-2025-27221: ruby-lang URI · Improper Removal of Sensitive Information Before Storage or Transfer

Affects ruby-lang URISource CVE Database V5

0

Not known to be exploited · CVSS 3.2 Low.

Data as of 25 Oct 2026, 19:02 UTC

CVSS 3.1 base score
3.2Low
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.5% chance of exploitation in 30 days – higher than 43% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 3 Mar 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.

What to do

Affected software

ProductAffectedFixed in
RubyGemsuripkg:gem/uriOther threatsAffected
  • =0
  • =0.12.0
  • =0.13.0
  • =1.0.0
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

1. Upgrade the Ruby URI gem to version 1.0.3 or later immediately to ensure the vulnerability is patched. 2. Conduct a thorough code review focusing on all instances where URIs are constructed or manipulated using URI.join, URI#merge, or URI#+, verifying that userinfo components are not unintentionally retained or exposed. 3. Implement logging and monitoring to detect any unusual URI patterns or potential credential leakage in application logs or network traffic. 4. Avoid embedding sensitive credentials directly in URIs; use alternative secure authentication mechanisms such as headers or tokens. 5. Educate developers on secure URI handling practices and the risks of retaining sensitive information in URI components. 6. For legacy systems where immediate upgrade is not feasible, consider applying code-level patches or wrappers that explicitly clear userinfo fields after URI manipulations. 7. Review and update security policies to include checks for sensitive data leakage in URI handling during development and security assessments.

Description

In the URI gem before 1.0.3 for Ruby, the URI handling methods (URI.join, URI#merge, URI#+) have an inadvertent leakage of authentication credentials because userinfo is retained even after changing the host.

References

Community reviews

Loading reviews…