Vulnerabilities in pkg:gem/thor
PACKAGECVE-2025-54314 is a HIGH (CVSS 7.8) thor can construct an unsafe vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Withdrawn Advisory libraries in the RubyGems ecosystem. The issue involves thor can construct an unsafe shell command from library input.. Remediation is available by upgrading affected packages to version 1.4.0.
pkg:gem/thor
Vulnerability advisories affecting package pkg:gem/thor. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-mqcp-p2hv-vw6x | CVE-2025-54314 | HIGH | Withdrawn Advisory: Thor can construct an unsafe shell command from library input. |
CVE-2025-54314 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2025-54314
To remediate this vulnerability, upgrade all affected Withdrawn Advisory 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 thor to 1.4.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for thor
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-54314, inspect your project dependencies for Withdrawn Advisory:
inspect dependencies for thor
Analyze the terminal output to locate any version of Withdrawn Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.0), 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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Withdrawn Advisory, 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-2025-54314 Affected Withdrawn Advisory Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
thor
|
RubyGems |
< 1.4.0
|
1.4.0
|
References
Frequently Asked Questions
What is CVE-2025-54314?
Which Withdrawn Advisory versions are affected?
What version fixes CVE-2025-54314?
Is thor affected?
What is the CVSS score of CVE-2025-54314?
What CWE is associated with CVE-2025-54314?
How can I check RubyGems dependencies for CVE-2025-54314?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mqcp-p2hv-vw6x",
"modified" : "2025-08-13T18:55:16Z",
"published" : "2025-07-20T03:30:19Z",
"withdrawn" : "2025-08-13T18:55:16Z",
"aliases" : [ "CVE-2025-54314" ],
"summary" : "Withdrawn Advisory: Thor can construct an unsafe shell command from library input.",
"details" : "### Withdrawn Advisory\nThis advisory has been withdrawn because the method described can only be used with arguments that are controlled by Thor, and an external attacker cannot access the functionality described in the body of the CVE. This link is maintained to preserve external references.\n\n### Original Description\nThor before 1.4.0 can construct an unsafe shell command from library input.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "thor"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.4.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-54314"
}, {
"type" : "WEB",
"url" : "https://github.com/github/advisory-database/pull/5912#issuecomment-3169255309"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/thor/pull/897"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/thor/commit/536b79036a0efb765c1899233412e7b1ca94abfa"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/3260153"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rails/thor"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/thor/releases/tag/v1.4.0"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/thor/CVE-2025-54314.yml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-07-21T19:33:25Z",
"nvd_published_at" : "2025-07-20T03:15:22Z"
}
}