CVE-2020-10571:
Potential buffer overflow in psd-tools
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.61007%
CWE
Published
3/16/2020
Updated
10/21/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
psd-tools | pip | >= 1.8.37, < 1.9.3 | 1.9.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The core vulnerability stems from the RLE decoding functions in both Cython (_rle.pyx) and Python (rle.py) implementations. The pre-patch code in _rle.decode performed unsafe memory operations without validating:
- Whether the source data buffer had sufficient bytes for the claimed RLE header length
- Whether the destination buffer had enough space for the decoded output This allowed attackers to craft PSD files that overread/overwrite memory. The Python version (rle.decode) had similar logic but in pure Python, which would throw IndexError instead of buffer overflow when Cython wasn't installed. The commit diff shows critical guard clauses were added to both implementations to validate buffer boundaries.