Bug 2042527 (CVE-2022-22817) - CVE-2022-22817 python-pillow: PIL.ImageMath.eval allows evaluation of arbitrary expressions
Summary: CVE-2022-22817 python-pillow: PIL.ImageMath.eval allows evaluation of arbitra...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2022-22817
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2042531 2042528 2042530 2048388 2048389 2048390 2048391 2048392 2048393
Blocks: 2042533
TreeView+ depends on / blocked
 
Reported: 2022-01-19 16:28 UTC by Guilherme de Almeida Suckevicz
Modified: 2022-08-02 16:17 UTC (History)
11 users (show)

Fixed In Version: Pillow 9.0.0
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in python-pillow. The vulnerability occurs due to Improper Neutralization, leading to command injection. This flaw allows an attacker to externally-influenced input commands that modify the intended command.
Clone Of:
Environment:
Last Closed: 2022-03-03 00:21:31 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:0609 0 None None None 2022-02-22 15:46:58 UTC
Red Hat Product Errata RHSA-2022:0643 0 None None None 2022-02-22 17:43:14 UTC
Red Hat Product Errata RHSA-2022:0665 0 None None None 2022-02-24 09:51:06 UTC
Red Hat Product Errata RHSA-2022:0667 0 None None None 2022-02-24 09:52:02 UTC
Red Hat Product Errata RHSA-2022:0669 0 None None None 2022-02-24 09:35:42 UTC

Description Guilherme de Almeida Suckevicz 2022-01-19 16:28:54 UTC
PIL.ImageMath.eval in Pillow before 9.0.0 allows evaluation of arbitrary expressions, such as ones that use the Python exec method.

Reference:
https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#restrict-builtins-available-to-imagemath-eval

Comment 1 Guilherme de Almeida Suckevicz 2022-01-19 16:29:24 UTC
Created mingw-python-pillow tracking bugs for this issue:

Affects: fedora-all [bug 2042528]


Created python-pillow tracking bugs for this issue:

Affects: fedora-all [bug 2042530]


Created python3-pillow tracking bugs for this issue:

Affects: epel-7 [bug 2042531]

Comment 6 Lumír Balhar 2022-02-07 07:21:13 UTC
It's very simple to reproduce and test this vulnerability:

```
from PIL.ImageMath import eval

try:
    eval("round(5.05)")
except ValueError:
    print("FIXED")
else:
    print("VULNERABLE")
```

Comment 8 errata-xmlrpc 2022-02-22 15:46:55 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2022:0609 https://access.redhat.com/errata/RHSA-2022:0609

Comment 9 errata-xmlrpc 2022-02-22 17:43:12 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:0643 https://access.redhat.com/errata/RHSA-2022:0643

Comment 10 errata-xmlrpc 2022-02-24 09:35:40 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Update Services for SAP Solutions

Via RHSA-2022:0669 https://access.redhat.com/errata/RHSA-2022:0669

Comment 11 errata-xmlrpc 2022-02-24 09:51:04 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Extended Update Support

Via RHSA-2022:0665 https://access.redhat.com/errata/RHSA-2022:0665

Comment 12 errata-xmlrpc 2022-02-24 09:52:00 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

Via RHSA-2022:0667 https://access.redhat.com/errata/RHSA-2022:0667

Comment 13 Product Security DevOps Team 2022-03-03 00:21:29 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-22817


Note You need to log in before you can comment on or make changes to this bug.