GHSA-4whq-r978-2x68: Exiftool vendored Arbitrary Code Execution Vulnerability
HIGHGHSA-4whq-r978-2x68 is a HIGH (CVSS 7.8) arbitrary code execution vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Exiftool vendored libraries in the npm ecosystem. The issue involves arbitrary code execution in exiftool. Remediation is available by upgrading affected packages to version 14.3.0.
GHSA-4whq-r978-2x68 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:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix GHSA-4whq-r978-2x68
To remediate this vulnerability, upgrade all affected Exiftool vendored dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install exiftool-vendored@14.3.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls exiftool-vendored
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-4whq-r978-2x68, inspect your project dependencies using npm:
npm ls exiftool-vendored
Analyze the terminal output to locate any version of Exiftool vendored in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 14.3.0), your application is affected.
Note: The npm ls exiftool-vendored command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Exiftool vendored, 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
GHSA-4whq-r978-2x68 Affected Exiftool vendored Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
exiftool-vendored
|
npm |
< 14.3.0
|
14.3.0
|
References
Frequently Asked Questions
What is GHSA-4whq-r978-2x68?
Which Exiftool vendored versions are affected?
What version fixes GHSA-4whq-r978-2x68?
Is exiftool-vendored affected?
What is the CVSS score of GHSA-4whq-r978-2x68?
What CWE is associated with GHSA-4whq-r978-2x68?
How can I check npm dependencies for GHSA-4whq-r978-2x68?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4whq-r978-2x68",
"modified" : "2021-10-08T21:20:43Z",
"published" : "2021-05-04T17:43:52Z",
"aliases" : [ ],
"summary" : "Arbitrary code execution in ExifTool",
"details" : "### Impact\n\nArbitrary code execution can occur when running `exiftool` against files with hostile metadata payloads.\n\n### Patches\n\nExifTool has already been patched in version 12.24. exiftool-vendored, which vendors ExifTool, includes this patch in v14.3.0.\n\n### Workarounds\n\nNo.\n\n### References\n\nhttps://twitter.com/wcbowling/status/1385803927321415687\nhttps://nvd.nist.gov/vuln/detail/CVE-2021-22204\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [exiftool-vendored](https://github.com/photostructure/exiftool-vendored.js)\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "exiftool-vendored"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "14.3.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/photostructure/exiftool-vendored.js/security/advisories/GHSA-4whq-r978-2x68"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/photostructure/exiftool-vendored.js"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-74" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-04T17:33:25Z",
"nvd_published_at" : null
}
}