ExifTool Flaw Can Let Malicious Images Run Commands on Macs


A serious ExifTool vulnerability can let attackers run shell commands on macOS by hiding malicious instructions inside image metadata. The flaw is tracked as CVE-2026-3102 and affects ExifTool 13.49 and earlier on macOS.

The issue is most dangerous for organizations that process large volumes of untrusted images through automated metadata workflows. That includes media teams, digital asset managers, forensic labs, legal teams, medical document handlers, and investigative journalists.

Kaspersky’s Global Research and Analysis Team discovered the bug in February 2026. ExifTool developers fixed it in version 13.50, and administrators should make sure all standalone and embedded ExifTool copies run a patched version.

What is CVE-2026-3102?

CVE-2026-3102 is a command injection vulnerability in ExifTool’s macOS-specific metadata handling code. It affects the SetMacOSTags function in the MacOS.pm component.

ExifTool reads and writes metadata in images, videos, audio files, PDFs, and many other file types. On macOS, it can also work with system attributes such as file creation dates.

The vulnerable path appears when ExifTool processes crafted metadata and applies it to macOS file creation date attributes. If the data reaches a system command without proper sanitization, an attacker can inject shell commands.

ExifTool vulnerability at a glance

DetailInformation
CVECVE-2026-3102
Affected softwareExifTool
Affected versions13.49 and earlier
Fixed version13.50 and later
Affected platformmacOS
Vulnerable functionSetMacOSTags
Attack typeOS command injection
Key conditionExifTool processes crafted metadata with -n or -printConv mode enabled

How a malicious image can trigger the flaw

The attack uses metadata rather than visible image content. The picture itself can look normal, while the metadata contains a malformed value with shell commands.

Kaspersky’s research points to the DateTimeOriginal field as a useful place to park the malicious payload. The attacker then relies on ExifTool’s metadata copy behavior to move that tainted value into a macOS file creation date field.

The vulnerable code path only works in specific conditions. The application or script must run on macOS, and ExifTool must process the data in raw machine-readable mode through the -n or -printConv option.

Why the -n flag matters

ExifTool normally applies formatting and conversion rules that can reject malformed date values. That normal behavior can stop the payload from reaching the vulnerable path.

The -n option changes that behavior. It tells ExifTool to output or process raw machine-readable values without the same human-readable conversion layer.

That makes the attack practical in workflows that already use -n for automation, data normalization, or metadata migration. A manual user who only previews a photo in a normal image viewer does not automatically hit this exploit path.

Where the sanitization failed

Kaspersky found that ExifTool escaped the file name parameter before passing it into the macOS system command. However, the date value was not handled with the same protection in the vulnerable branch.

That difference created the injection point. A crafted metadata value could break out of the intended command structure and execute additional shell commands with the privileges of the user running ExifTool.

If ExifTool runs inside an automated enterprise pipeline, the impact could extend beyond a single desktop. A compromised processing host could give attackers access to files, credentials, or internal network resources available to that account.

Why automated image workflows face more risk

  • They process files from outside sources at scale.
  • They may use ExifTool without visible user prompts.
  • They often run scripts with broad file access.
  • They may use -n mode for machine-readable metadata handling.
  • They may include embedded ExifTool copies that administrators do not update directly.

Newsrooms, archives, courts, hospitals, insurance teams, and forensic labs should pay special attention. These environments often receive images and documents from external parties and process them through automated systems.

What attackers could do after exploitation

Successful exploitation allows command execution as the user or service account that runs ExifTool. That access level depends on the workflow.

If a user runs ExifTool manually, the attacker gains that user’s privileges. If a background service or digital asset platform runs ExifTool, the attacker gains whatever access that service account has.

That could allow attackers to download malware, steal files, run reconnaissance commands, create persistence, or move laterally if the processing machine has network access to other systems.

Possible impact

Impact areaWhat could happen
Endpoint securityA malicious image could trigger shell commands during metadata processing.
Data exposureAttackers could access files readable by the ExifTool user account.
Malware deliveryThe injected command could download and run a payload.
Workflow compromiseAutomated asset or forensic pipelines could process attacker-supplied files silently.
Lateral movementA compromised processing host could become a foothold inside a corporate network.

How ExifTool fixed the issue

ExifTool 13.50 changed the vulnerable behavior. The patch moved away from fragile string-built system command handling and used a safer argument-based approach.

This matters because shell command strings are easy to break when untrusted input enters the wrong place. Passing arguments as a list reduces the risk of shell interpretation.

The ExifTool 13.50 release notes also credit Tay Kiat Loong for reporting a potential macOS security issue. Kaspersky later published a deeper technical analysis of CVE-2026-3102.

Who should update immediately?

  • Mac users who run ExifTool 13.49 or earlier.
  • Organizations that process third-party images on macOS.
  • Digital asset management teams using ExifTool behind the scenes.
  • Forensic labs and investigative teams handling untrusted media.
  • Publishers, newsrooms, and photo departments with automated metadata scripts.
  • Developers shipping software with an embedded ExifTool copy.

Updating the command-line ExifTool binary may not fix every exposure. Some third-party applications bundle their own ExifTool copy, so teams must check embedded versions too.

  • Upgrade ExifTool to version 13.50 or later.
  • Check third-party macOS apps for embedded ExifTool copies.
  • Review scripts that use the -n or -printConv option.
  • Process untrusted files inside an isolated virtual machine or sandbox.
  • Limit network access from image-processing machines.
  • Run metadata processing under low-privilege accounts.
  • Monitor for unexpected shell commands launched from ExifTool workflows.
  • Apply endpoint protection on Macs used for BYOD or contractor workflows.

How to check your ExifTool version

Mac users and administrators can check the installed version from Terminal. The command below prints the active ExifTool version used by the current shell path.

TaskCommand
Check ExifTool versionexiftool -ver
Find the active ExifTool binarywhich exiftool
Check whether a script uses raw output modegrep -R “exiftool.*-n” /path/to/scripts

Organizations should not rely only on the system path check. Asset management tools, image importers, and custom automation packages may carry separate bundled copies.

Why this flaw matters for macOS security

The vulnerability shows why metadata tools deserve the same security attention as document readers and media parsers. They process complex, attacker-controlled data and often run inside trusted workflows.

It also challenges the assumption that a harmless-looking photo cannot create serious risk. The visible image can remain ordinary while metadata triggers unsafe behavior inside a tool that parses it.

For defenders, the main lesson is practical. Patch ExifTool, audit embedded copies, and isolate untrusted media processing. Those steps reduce the risk without disrupting legitimate image and metadata workflows.

FAQ

What is CVE-2026-3102 in ExifTool?

CVE-2026-3102 is a macOS command injection vulnerability in ExifTool. It can allow crafted image metadata to run shell commands when a vulnerable version processes the file under specific conditions.

Which ExifTool versions are affected?

Kaspersky says ExifTool 13.49 and earlier are affected on macOS. ExifTool 13.50 fixed the vulnerability, so users should update to 13.50 or any later release.

Can a Mac be compromised just by opening any image?

No. The attack requires a vulnerable ExifTool workflow on macOS and specific processing conditions, including use of the -n or -printConv mode. Normal image previewing is not the same as running the vulnerable ExifTool path.

Why are automated image workflows at higher risk?

Automated workflows may process untrusted files silently, run ExifTool in raw metadata mode, and use service accounts with broad file access. This can make command execution more damaging if a malicious image reaches the pipeline.

How can organizations mitigate the ExifTool vulnerability?

Organizations should upgrade ExifTool, check third-party apps for embedded copies, review scripts that use -n or -printConv, isolate untrusted file processing, and monitor for unexpected commands launched from metadata workflows.

Readers help support VPNCentral. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help VPNCentral sustain the editorial team Read more

User forum

0 messages