GLSA-202312-01 : Leptonica: Multiple Vulnerabilities

critical Nessus Plugin ID 187052

Description

The remote host is affected by the vulnerability described in GLSA-202312-01 (Leptonica: Multiple Vulnerabilities)

- Leptonica 1.74.4 constructs unintended pathnames (containing duplicated path components) when operating on files in /tmp subdirectories, which might allow local users to bypass intended file restrictions by leveraging access to a directory located deeper within the /tmp directory tree, as demonstrated by /tmp/ANY/PATH/ANY/PATH/input.tif. (CVE-2017-18196)

- Leptonica before 1.75.3 does not limit the number of characters in a %s format argument to fscanf or sscanf, which allows remote attackers to cause a denial of service (stack-based buffer overflow) or possibly have unspecified other impact via a long string, as demonstrated by the gplotRead and ptaReadStream functions. (CVE-2018-7186)

- An issue was discovered in pixHtmlViewer in prog/htmlviewer.c in Leptonica before 1.75.3. Unsanitized input (rootname) can overflow a buffer, leading potentially to arbitrary code execution or possibly unspecified other impact. (CVE-2018-7247)

- An issue was discovered in Leptonica through 1.75.3. The gplotMakeOutput function allows command injection via a $(command) approach in the gplot rootname argument. This issue exists because of an incomplete fix for CVE-2018-3836. (CVE-2018-7440)

- Leptonica through 1.75.3 uses hardcoded /tmp pathnames, which might allow local users to overwrite arbitrary files or have unspecified other impact by creating files in advance or winning a race condition, as demonstrated by /tmp/junk_split_image.ps in prog/splitimage2pdf.c. (CVE-2018-7441)

- An issue was discovered in Leptonica through 1.75.3. The gplotMakeOutput function does not block '/' characters in the gplot rootname argument, potentially leading to path traversal and arbitrary file overwrite. (CVE-2018-7442)

- An issue in the Leptonica linked library (v1.79.0) allows attackers to cause an arithmetic exception leading to a Denial of Service (DoS) via a crafted JPEG file. (CVE-2022-38266)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

All Leptonica users should upgrade to the latest version:

# emerge --sync # emerge --ask --oneshot --verbose >=media-libs/leptonica-1.81.0

See Also

https://security.gentoo.org/glsa/202312-01

https://bugs.gentoo.org/show_bug.cgi?id=649752

https://bugs.gentoo.org/show_bug.cgi?id=869416

Plugin Details

Severity: Critical

ID: 187052

File Name: gentoo_GLSA-202312-01.nasl

Version: 1.0

Type: local

Published: 12/18/2023

Updated: 12/18/2023

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 5.9

CVSS v2

Risk Factor: High

Base Score: 7.5

Temporal Score: 5.9

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P

CVSS Score Source: CVE-2018-7440

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.8

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: p-cpe:/a:gentoo:linux:leptonica, cpe:/o:gentoo:linux

Required KB Items: Host/local_checks_enabled, Host/Gentoo/release, Host/Gentoo/qpkg-list

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 12/18/2023

Vulnerability Publication Date: 2/16/2018

Reference Information

CVE: CVE-2017-18196, CVE-2018-7186, CVE-2018-7247, CVE-2018-7440, CVE-2018-7441, CVE-2018-7442, CVE-2022-38266