CVE-2022-4643 docconv pdf_ocr.go ConvertPDFImages os command injection

Medium 6.3 Published Updated

Remote attackers can execute arbitrary OS commands via the ConvertPDFImages function in the docconv library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2022-4643?

CVE-2022-4643 is a medium-severity command injection vulnerability in docconv, published on 21 Dec 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

A vulnerability was found in docconv up to 1.2.0. It has been declared as critical. This vulnerability affects the function ConvertPDFImages of the file pdf_ocr.go. The manipulation of the argument path leads to os command injection. The attack can be initiated remotely. Upgrading to version 1.2.1 is able to address this issue. The name of the patch is b19021ade3d0b71c89d35cb00eb9e589a121faa5. It is recommended to upgrade the affected component. VDB-216502 is the identifier assigned to this vulnerability.

Weakness: CWE-78

Which versions are affected by CVE-2022-4643?

5 open source packages ship an affected version, including code.sajari.com/docconv and github.com/sajari/docconv. It affects 1 product.

PackageAffectedFixed in
code.sajari.com/docconv GoFrom 1.1.01.3.5
code.sajari.com/docconv GoFrom 1.1.01.3.5
code.sajari.com/docconv GoFrom 1.1.01.3.5
github.com/sajari/docconv GoAll versions1.2.1
github.com/sajari/docconv GoAll versions1.2.1

Products include Search Docconv.

How do I fix CVE-2022-4643?

Upgrade code.sajari.com/docconv to 1.3.5 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2022-4643 being exploited?

There is no known exploitation of CVE-2022-4643 in the wild and no public exploit code.

Sources

Also known as GHSA-6m4h-hfpp-x8cx, GO-2022-1184.

Is CVE-2022-4643 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free