CVE-2023-28362: Actionpack Cross-Site Scripting Vulnerability
MODERATECVE-2023-28362 is a MODERATE (CVSS 4.0) cross-site scripting vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Actionpack libraries in the RubyGems ecosystem. The issue involves actionpack has possible cross-site scripting vulnerability via user supplied values to redirect_to. Remediation is available by upgrading affected packages to version 6.1.7.4, 7.0.5.1.
CVE-2023-28362 at a Glance
Security Impact
CVSS: 4.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2023-28362
To remediate this vulnerability, upgrade all affected Actionpack dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade actionpack to 6.1.7.4
Upgrade actionpack to 7.0.5.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for actionpack
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-28362, inspect your project dependencies for Actionpack:
inspect dependencies for actionpack
Analyze the terminal output to locate any version of Actionpack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.1.7.4), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Actionpack, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-28362 Affected Actionpack Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
actionpack
|
RubyGems |
< 6.1.7.4
|
6.1.7.4
|
|
actionpack
|
RubyGems |
≥ 7.0.0
< 7.0.5.1
|
7.0.5.1
|
References
Frequently Asked Questions
What is CVE-2023-28362?
Which Actionpack versions are affected?
What version fixes CVE-2023-28362?
Is actionpack affected?
What is the CVSS score of CVE-2023-28362?
What CWE is associated with CVE-2023-28362?
How can I check RubyGems dependencies for CVE-2023-28362?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4g8v-vg43-wpgf",
"modified" : "2025-05-05T17:10:34Z",
"published" : "2023-06-29T15:03:16Z",
"aliases" : [ "CVE-2023-28362" ],
"summary" : "Actionpack has possible cross-site scripting vulnerability via User Supplied Values to redirect_to",
"details" : "The `redirect_to` method in Rails allows provided values to contain characters which are not legal in an HTTP header value. This results in the potential for downstream services which enforce RFC compliance on HTTP response headers to remove the assigned Location header. This vulnerability has been assigned the CVE identifier CVE-2023-28362.\n\nVersions Affected: All. Not affected: None Fixed Versions: 7.0.5.1, 6.1.7.4\n\n# Impact\n\nThis introduces the potential for a Cross-site-scripting (XSS) payload to be delivered on the now static redirection page. Note that this both requires user interaction and for a Rails app to be configured to allow redirects to external hosts (defaults to false in Rails >= 7.0.x).\n\n# Releases\n\nThe FIXED releases are available at the normal locations.\n\n# Workarounds\n\nAvoid providing user supplied URLs with arbitrary schemes to the `redirect_to` method.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "actionpack"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.1.7.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "actionpack"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.0.5.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-28362"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails/commit/1c3f93d1e90a3475f9ae2377ead25ccf11f71441"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails/commit/69e37c84e3f77d75566424c7d0015172d6a6fac5"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails/commit/c9ab9b32bcdcfd8bcd55907f6c7b20b4e004cc23"
}, {
"type" : "WEB",
"url" : "https://discuss.rubyonrails.org/t/cve-2023-28362-possible-xss-via-user-supplied-values-to-redirect-to/83132"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rails/rails"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2023-28362.yml"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20250502-0009"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-116" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-29T15:03:16Z",
"nvd_published_at" : "2025-01-09T01:15:07Z"
}
}