CVE-2025-54314: Withdrawn Advisory Thor Can Construct An Unsafe Vulnerability

HIGH
Advisory Identifier: GHSA-mqcp-p2hv-vw6x
CVSS 7.8
CWE-78
Published
Advisory Summary

CVE-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.

CVE-2025-54314 at a Glance

CVE Identifier CVE-2025-54314
GHSA Identifier GHSA-mqcp-p2hv-vw6x
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Withdrawn Advisory
Package Ecosystem RubyGems
Published Date
Last Updated

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).

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (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.

thor fixed: 1.4.0
Upgrade thor to 1.4.0
Verify Direct and Transitive Dependencies

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

### Withdrawn Advisory This 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. ### Original Description Thor before 1.4.0 can construct an unsafe shell command from library input.

CVE-2025-54314 Affected Withdrawn Advisory Versions

1 component(s)
Fixed Versions:
1.4.0
Product / Package Ecosystem Affected Versions Fixed Version
thor
RubyGems
< 1.4.0
1.4.0

References

Frequently Asked Questions

What is CVE-2025-54314?
CVE-2025-54314 is a security vulnerability in Withdrawn Advisory involving Thor can construct an unsafe shell command from library input. under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Withdrawn Advisory versions are affected?
Affected versions include releases prior to 1.4.0 across affected packages: thor.
What version fixes CVE-2025-54314?
Upgrading to 1.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is thor affected?
Yes, thor is affected in releases prior to 1.4.0. Upgrade your dependency to 1.4.0 or later.
What is the CVSS score of CVE-2025-54314?
CVE-2025-54314 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2025-54314?
CVE-2025-54314 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (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.).
How can I check RubyGems dependencies for CVE-2025-54314?
Run the dependency tree command: 'inspect dependencies for thor'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}