CVE-2022-22577
Cross-site Scripting Vulnerability in Action Pack
Also known as GHSA-mm33-5vfq-3mm3
Mitigation
- Upgrade actionpack to one of 5.2.7.1, 6.0.4.8, 6.1.5.1, 7.0.2.4 (or later in the same release line).
Who should check
- Projects that depend on RubyGems package actionpack (>= 5.2.0, < 5.2.7.1)
- Anyone running https://github.com/rails/rails 7.0.2.4, 6.1.5.1, 6.0.4.8, 5.2.7.1
Vulnerability facts
- Affected
- actionpack >= 5.2.0, < 5.2.7.1
- Fixed in
- 5.2.7.1, 6.0.4.8, 6.1.5.1, 7.0.2.4
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 6.1 (v3.1, NVD)CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: Required
- Scope: Changed (impact reaches other components)
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: None
- EPSS
- 1.42% chance of exploitation in 30 days (percentile 73, 2026-11-26)
- CWE
- CWE-79
- Modified
Description
An XSS Vulnerability in Action Pack >= 5.2.0 and < 5.2.0 that could allow an attacker to bypass CSP for non HTML like responses.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| RubyGems actionpack | >= 5.2.0, < 5.2.7.1 | 5.2.7.1, 6.0.4.8, 6.1.5.1, 7.0.2.4 | osv |
| https://github.com/rails/rails | 7.0.2.4, 6.1.5.1, 6.0.4.8, 5.2.7.1 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2022-22577. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2022-22577.md Affected: actionpack >= 5.2.0, < 5.2.7.1 Fixed in: 5.2.7.1, 6.0.4.8, 6.1.5.1, 7.0.2.4 Steps: 1. Search this machine and project for actionpack (RubyGems), https://github.com/rails/rails: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
- https://discuss.rubyonrails.org/t/cve-2022-22577-possible-xss-vulnerability-in-action-pack/80533
- https://github.com/rails/rails/pull/44635
- https://github.com/rails/rails/commit/2b820a2a69fa50cffa74b4aedc57bf92ed6910ec
- https://github.com/rails/rails/commit/5299b57d596ea274f77f5ffee2b79c6ee0255508
- https://github.com/rails/rails/commit/8198d7c4accad0b6ba956b9d59528534a289866b
- https://github.com/rails/rails/commit/d2253115ac2b30f5f7210670af906cebf79cf809
Other
- https://lists.debian.org/debian-lts-announce/2022/09/msg00002.html
- https://security.netapp.com/advisory/ntap-20221118-0002/
- https://github.com/rails/rails
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2022-22577.yml
- https://groups.google.com/g/ruby-security-ann/c/NuFRKaN5swI
- https://rubyonrails.org/2022/4/26/Rails-7-0-2-4-6-1-5-1-6-0-4-8-and-5-2-7-1-have-been-released
- https://security.netapp.com/advisory/ntap-20221118-0002
FAQ
Is CVE-2022-22577 being exploited?
There is no confirmed exploitation: CVE-2022-22577 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.42% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2022-22577?
Medium: CVSS 6.1 (v3.1, scored by NVD). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2022-22577?
actionpack >= 5.2.0, < 5.2.7.1.
Is there a fix for CVE-2022-22577?
Yes. Fixed in 5.2.7.1, 6.0.4.8, 6.1.5.1, 7.0.2.4. Upgrade actionpack to one of 5.2.7.1, 6.0.4.8, 6.1.5.1, 7.0.2.4 (or later in the same release line).
How do I check if I'm affected by CVE-2022-22577?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.