Is cgi 0.4 vulnerable?
RubyGems · 3 releases from 0.4.0 to 0.4.2 · latest cgi is 0.5.2 · checked 18 Nov 2026
No known advisories in the last release
cgi 0.4.2, the last 0.4 release, has no known advisories. 2 advisories affect earlier 0.4.x releases, so update to 0.4.2.
bundle update --conservative cgi # Gemfile: '>= 0.4.2'Is your project on an affected cgi?
Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Fixed within 0.4.x, affecting earlier releases
CGI has Regular Expression Denial of Service (ReDoS) potential in Util#escapeElement
- Affected
- <0.3.5.1 · >=0.3.6 <0.3.7 · >=0.4.0 <0.4.2
- Fixed in
- 0.3.5.1, 0.3.7, 0.4.2
CGI has Denial of Service (DoS) potential in Cookie.parse
- Affected
- <0.3.5.1 · >=0.3.6 <0.3.7 · >=0.4.0 <0.4.2
- Fixed in
- 0.3.5.1, 0.3.7, 0.4.2
Every cgi 0.4.x release
Affected: 0.4.0 to 0.4.1. 0.4.2 is not affected. Latest cgi: 0.5.2.
| Version | Known advisories |
|---|---|
| cgi 0.4.2 | None |
| cgi 0.4.1 | CVE-2025-27220, CVE-2025-27219 |
| cgi 0.4.0 | CVE-2025-27220, CVE-2025-27219 |
Which of your client projects are still on cgi 0.4?
NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact cgi version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.
Other cgi versions
Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the RubyGems registry. Refreshed daily.