ExifTool Metadata Field Command Injection (macOS) — CVE-2026-3102
by HORKimhab · 2026-07-05
- Severity
- High
- CVE
- CVE-2026-3102
- Category
- binary
- Affected product
- ExifTool
- Affected versions
- <= 13.49 (per source repository claim)
- Disclosed
- 2026-07-05
- Patch status
- unpatched
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-05 |
| Author / Researcher | HORKimhab |
| CVE / Advisory | CVE-2026-3102 |
| Category | binary |
| Severity | High |
| CVSS Score | Not specified in source |
| Status | PoC |
| Tags | exiftool, command-injection, macos, metadata, reverse-shell, tagsfromfile, perl |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | ExifTool |
| Versions Affected | <= 13.49 (per source repository claim) |
| Language / Platform | Bash / Python (PoC), ExifTool (Perl), macOS |
| Authentication Required | No (local tool invocation against attacker-crafted image metadata) |
| Network Access Required | No (triggers locally; reverse-shell payload requires outbound network) |
Summary
The PoC demonstrates a command-injection pattern in ExifTool’s metadata tag-copy workflow: a crafted DateTimeOriginal value containing shell metacharacters is written into an image’s metadata, and when the image is later processed with -tagsFromFile ... "-FileCreateDate<DateTimeOriginal", the injected shell fragment is executed by the underlying command-execution path rather than being treated as inert metadata. The included scripts write a minimal PNG/JPEG, embed the injection payload, and trigger it, using a proof-of-file-creation and (in the .sh variant) an attacker-configurable reverse-shell payload template.
Vulnerability Details
Root Cause
Insufficient sanitization of metadata field values (specifically DateTimeOriginal) when they are subsequently used in a -TagsFromFile/tag-copy operation, allowing shell metacharacters embedded in the field to be interpreted and executed rather than treated as literal string data.
Attack Vector
- Attacker crafts a minimal valid image file (PNG/JPEG).
- Attacker uses ExifTool itself (or a crafted file) to set
DateTimeOriginalto a value containing a shell-injection payload (e.g.'; touch /tmp/pwned; ... #). - Victim (or an automated pipeline) runs ExifTool with
-tagsFromFile ... "-FileCreateDate<DateTimeOriginal"against the crafted image. - The injected shell fragment executes in the context of the process running ExifTool, running attacker-chosen commands (proof-of-concept: creating a marker file; optionally, spawning a reverse shell).
Impact
Command execution in the context of whatever user/process invokes the vulnerable ExifTool workflow against attacker-supplied images — on macOS this can lead to a reverse shell and further local compromise.
Environment / Lab Setup
Target: macOS host with ExifTool <= 13.49 installed
Attacker: netcat listener (nc -lvnp <port>) for the reverse-shell variant; bash/python3 to run the PoC
Proof of Concept
PoC Script
See
exiftool_poc.shandexiftool_poc.pyin this folder.
| |
exiftool_poc.sh builds a minimal PNG, injects a Python-reverse-shell payload into DateTimeOriginal, then triggers execution via -tagsFromFile ... "-FileCreateDate<DateTimeOriginal", reporting success if a marker file appears. exiftool_poc.py is a simplified, self-contained variant that only proves command execution by writing a marker file and log entry (no network callback).
Detection & Indicators of Compromise
Signs of compromise:
- Unexpected child processes (bash, sh, python3, nc) spawned by an ExifTool invocation
- Marker files such as
/tmp/exiftool_pwnedor/tmp/pwned_*present on disk - Outbound connections from a host shortly after processing an untrusted image with ExifTool
Remediation
| Action | Detail |
|---|---|
| Primary fix | No vendor patch confirmed as of 2026-07-05 — monitor for advisory |
| Interim mitigation | Never run exiftool -tagsFromFile (or similar tag-copy operations) against untrusted images without sandboxing; strip/validate metadata fields before further processing |
References
Notes
Mirrored from https://github.com/HORKimhab/CVE-2026-3102 on 2026-07-05. This repository originates from an account previously observed publishing mostly empty/stub CVE repos (a pattern associated with low-effort “CVE farming”), so it was treated with elevated scrutiny before mirroring. The two scripts were manually reviewed line-by-line: the reverse-shell payload requires the operator to fill in their own attacker IP/port placeholders, there is no obfuscation, no hardcoded external callback/download URL, and no behavior beyond the documented metadata-injection technique — no hidden or booby-trapped logic was found. Treat this PoC with continued caution given the source account’s history, and re-verify independently before relying on it operationally.
| |