CVE-2022-22577: Cross-site Scripting Vulnerability in Action Pack
6.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.44045%
CWE
Published
4/27/2022
Updated
4/13/2023
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
actionpack | rubygems | >= 5.2.0, <= 5.2.7.0 | 5.2.7.1 |
actionpack | rubygems | >= 6.0.0, <= 6.0.4.7 | 6.0.4.8 |
actionpack | rubygems | >= 6.1.0, <= 6.1.5.0 | 6.1.5.1 |
actionpack | rubygems | >= 7.0.0, <= 7.0.2.3 | 7.0.2.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from Rails only applying CSP headers to HTML responses. The commit diff shows the removal of the html_response?
guard clause in the Content Security Policy middleware. This function's presence in vulnerable versions explicitly skipped CSP header generation for non-HTML responses, which is the core of the vulnerability. The removal of this check in patched versions confirms its role in the issue.