CVE-2025-27220

In the CGI gem before 0.4.2 for Ruby, a Regular Expression Denial of Service (ReDoS) vulnerability exists in the Util#escapeElement method.

Published: 2025-03-04 Last update: 2025-11-03 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2025-27220 is rated Low Risk (32.8/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.25%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2025-27220

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-02 0.25% 0.25% -0.01%
2 2026-05-22 0.25% 0.25% +0.01%
3 2026-05-02 0.25%

Full EPSS history (33 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2025-27220

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
4.0 3.1 MEDIUM
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:L Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.
2.2 1.4 [email protected]
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 3.6 [email protected]

Weakness enumeration for CVE-2025-27220

GitHub Security Advisory for CVE-2025-27220

GHSA-mhwm-jh88-3gjf · Severity: medium · Ecosystem: rubygems — CGI has Regular Expression Denial of Service (ReDoS) potential in Util#escapeElement

OS Trackers for CVE-2025-27220

vendor priority summary link
debian not yet assigned CVE-2025-27220 not yet assigned priority: Debian including 3 source packages (ruby2.7, ruby3.1, ruby3.3), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 4, open 1. https://security-tracker.debian.org/tracker/CVE-2025-27220
redhat medium https://access.redhat.com/security/cve/CVE-2025-27220
suse medium CVE-2025-27220 severity moderate: SUSE including 308 source package names (2.23-77.6:libruby2_5-2_5-2.5.9-150000.4.41.1, 2.23-77.6:ruby2.5-2.5.9-150000.4.41.1, …), 940 product×package rows across 204 product lines (Container bci/ruby, Container suse/rmt-server, … (204 product lines)): Fixed 651, Known Affected 231, Known Not Affected 58. https://www.suse.com/security/cve/CVE-2025-27220/
ubuntu medium CVE-2025-27220 medium priority: Ubuntu including 7 source packages (jruby, ruby2.3, …), 54 status rows across 10 suites (bionic, focal, jammy, noble, oracular, plucky, questing, trusty, upstream, xenial): DNE 31, needs-triage 13, released 8, ignored 2. https://ubuntu.com/security/CVE-2025-27220

Affected software / configurations for CVE-2025-27220

Vendor Product Version Raw CPE
ruby-lang cgi < 0.3.5.1 cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:*
ruby-lang cgi >= 0.4.0, < 0.4.2 cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:*
ruby-lang cgi 0.3.6 cpe:2.3:a:ruby-lang:cgi:0.3.6:*:*:*:*:ruby:*:*

References for CVE-2025-27220

cvelogic Threat Intelligence