# GHSA-4whq-r978-2x68: Arbitrary code execution in ExifTool

> Attackers can execute arbitrary code by tricking users into processing malicious image files with ExifTool.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Not stated
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 4 May 2021

## What is GHSA-4whq-r978-2x68?

GHSA-4whq-r978-2x68 is a code injection vulnerability in exiftool-vendored, published on 4 May 2021. 

### Official description

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

## Which versions are affected by GHSA-4whq-r978-2x68?

2 open source packages ship an affected version, including exiftool-vendored.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `exiftool-vendored` | npm | All versions | 14.3.0 |
| `exiftool-vendored` | npm | All versions | 14.3.0 |

## How do I fix GHSA-4whq-r978-2x68?

Upgrade exiftool-vendored to 14.3.0 or later.

## Is GHSA-4whq-r978-2x68 being exploited?

There is no known exploitation of GHSA-4whq-r978-2x68 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-4whq-r978-2x68 and fix it if it is affected.

What it is: GHSA-4whq-r978-2x68 is a code injection vulnerability in exiftool-vendored, published on 4 May 2021. 
Exploitation: There is no known exploitation of GHSA-4whq-r978-2x68 in the wild and no public exploit code.

Affected packages and fixed versions:
- exiftool-vendored (npm): affected all versions; fixed in 14.3.0
- exiftool-vendored (npm): affected all versions; fixed in 14.3.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-4whq-r978-2x68/ (Markdown: https://insights.sbomify.com/GHSA-4whq-r978-2x68/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-4whq-r978-2x68

---
From sbomify Insights: https://insights.sbomify.com/GHSA-4whq-r978-2x68/
Summaries are generated and may contain mistakes; the official description above is the record.
