Multiple vulnerabilities in Pillow



Published: 2022-01-25
Risk High
Patch available YES
Number of vulnerabilities 3
CVE-ID CVE-2022-22817
CVE-2022-22816
CVE-2022-22815
CWE-ID CWE-749
CWE-125
CWE-22
Exploitation vector Network
Public exploit N/A
Vulnerable software
Subscribe
Pillow
Universal components / Libraries / Libraries used by multiple products

Vendor Alex Clark and Contributors

Security Bulletin

This security bulletin contains information about 3 vulnerabilities.

1) Exposed dangerous method or function

EUVDB-ID: #VU60003

Risk: High

CVSSv3.1: 8.5 [CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C]

CVE-ID: CVE-2022-22817

CWE-ID: CWE-749 - Exposed Dangerous Method or Function

Exploit availability: No

Description

The vulnerability allows a remote attacker to compromise the affected system.

The vulnerability exists due to usage of PIL.ImageMath.eval() function on arbitrary expressions. A remote attacker can pass specially crafted file to the library and execute arbitrary code on the system.

Mitigation

Install updates from vendor's website.

Vulnerable software versions

Pillow: 1.0 - 8.4.0


CPE2.3 External links

http://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#restrict-builtins-available-to-imagemath-eval
http://lists.debian.org/debian-lts-announce/2022/01/msg00018.html
http://www.debian.org/security/2022/dsa-5053

Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.

2) Out-of-bounds read

EUVDB-ID: #VU60002

Risk: Medium

CVSSv3.1: 6.5 [CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C]

CVE-ID: CVE-2022-22816

CWE-ID: CWE-125 - Out-of-bounds Read

Exploit availability: No

Description

The vulnerability allows a remote attacker to gain access to sensitive information.

The vulnerability exists due to buffer over-read during initialization of ImagePath.Path in path_getbbox() function in path.c. A remote attacker can pass a specially crafted file to the affected library and read contents of memory on the system.

Mitigation

Install update from vendor's website.

Vulnerable software versions

Pillow: 1.0 - 8.4.0


CPE2.3 External links

http://github.com/python-pillow/Pillow/blob/c5d9223a8b5e9295d15b5a9b1ef1dae44c8499f3/src/path.c#L331
http://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#fixed-imagepath-path-array-handling
http://lists.debian.org/debian-lts-announce/2022/01/msg00018.html
http://www.debian.org/security/2022/dsa-5053

Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.

3) Path traversal

EUVDB-ID: #VU60001

Risk: Medium

CVSSv3.1: 6.5 [CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C]

CVE-ID: CVE-2022-22815

CWE-ID: CWE-22 - Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Exploit availability: No

Description

The vulnerability allows a remote attacker to perform directory traversal attacks.

The vulnerability exists due to input validation error when processing directory traversal sequences in path_getbbox() function in path.c. A remote attacker can send a specially crafted HTTP request and read arbitrary files on the system.

Mitigation

Install update from vendor's website.

Vulnerable software versions

Pillow: 1.0 - 8.4.0


CPE2.3 External links

http://github.com/python-pillow/Pillow/blob/c5d9223a8b5e9295d15b5a9b1ef1dae44c8499f3/src/path.c#L331
http://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#fixed-imagepath-path-array-handling
http://lists.debian.org/debian-lts-announce/2022/01/msg00018.html
http://www.debian.org/security/2022/dsa-5053

Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.



###SIDEBAR###