Intel

AIKIDO-2026-73955

ocrmypdf is vulnerable to Code Injection

GHSA-jr24-5gpp-fwx7Published Aug 6, 2026
August 6, 2026

64

CVE Score

Medium

Code Injection

Are you affected? Scan for Free

TL;DR

OCRmyPDF ships a misc/watcher.py helper that runs OCRmyPDF on files dropped into configurable input, output, and archive directories. When those processing folders overlap the installation's interpreter paths, virtual environment, plugins, or settings file and are writable by the users who submit files, a submitter can plant code or point the settings at a malicious plugin that the helper then loads and executes. This grants code execution with the privileges of the account running the watcher. The fix adds startup validation that refuses to run when data directories overlap code or writable settings, and stops the helper from following symlinks or processing non-regular files.

How do I fix this?

Upgrade the ocrmypdf library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you deploy the misc/watcher.py helper with processing folders that overlap the installation's code, plugins, or configuration and are writable by the users who submit files.

Package

Versions

0.0.1 - 17.8.1

Fixed in 17.10.0

Background info

ocrmypdf is vulnerable to Code Injection in versions 0.0.1 - 17.8.1.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea