GHSA-4whq-r978-2x68: Exiftool vendored Arbitrary Code Execution Vulnerability

HIGH
CVSS 7.8
CWE-74
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-4whq-r978-2x68
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Exiftool vendored
Package Ecosystem npm
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:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

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

exiftool-vendored fixed: 14.3.0
npm install exiftool-vendored@14.3.0
Verify Direct and Transitive Dependencies

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

### Impact Arbitrary code execution can occur when running `exiftool` against files with hostile metadata payloads. ### Patches ExifTool has already been patched in version 12.24. exiftool-vendored, which vendors ExifTool, includes this patch in v14.3.0. ### Workarounds No. ### References https://twitter.com/wcbowling/status/1385803927321415687 https://nvd.nist.gov/vuln/detail/CVE-2021-22204 ### For more information If you have any questions or comments about this advisory: * Open an issue in [exiftool-vendored](https://github.com/photostructure/exiftool-vendored.js)

GHSA-4whq-r978-2x68 Affected Exiftool vendored Versions

1 component(s)
Fixed Versions:
14.3.0
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?
GHSA-4whq-r978-2x68 is a security vulnerability in Exiftool vendored involving Arbitrary code execution in ExifTool under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Exiftool vendored versions are affected?
Affected versions include releases prior to 14.3.0 across affected packages: exiftool-vendored.
What version fixes GHSA-4whq-r978-2x68?
Upgrading to 14.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is exiftool-vendored affected?
Yes, exiftool-vendored is affected in releases prior to 14.3.0. Upgrade your dependency to 14.3.0 or later.
What is the CVSS score of GHSA-4whq-r978-2x68?
GHSA-4whq-r978-2x68 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with GHSA-4whq-r978-2x68?
GHSA-4whq-r978-2x68 is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (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.).
How can I check npm dependencies for GHSA-4whq-r978-2x68?
Run the dependency tree command: 'npm ls exiftool-vendored'. 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-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
  }
}