Intel

AIKIDO-2026-73955

ocrmypdf is vulnerable to Code Injection

Code InjectionGHSA-jr24-5gpp-fwx7 Published Yesterday

64

Medium Risk

This Affects:

PYTHONocrmypdf
0.0.1 - 17.8.1
Fixed in 17.10.0
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.

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.

Background info

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

How to fix this

Upgrade the ocrmypdf library to the patch version.