SB2025062630 - Multiple vulnerabilities in Python
Published: June 26, 2025 Updated: June 28, 2025
Breakdown by Severity
- Low
- Medium
- High
- Critical
Description
This security bulletin contains information about 6 secuirty vulnerabilities.
1) Path traversal (CVE-ID: CVE-2025-4517)
The vulnerability allows a remote attacker to compromise the affected system.
The vulnerability exists due to input validation error in the tarfile module when extracting files from an archive with filter="data". A remote attacker can pass specially crafted archive to the application and write files to arbitrary locations on the system outside the extraction directory.
2) Link following (CVE-ID: CVE-2025-4330)
The vulnerability allows a remote attacker to compromise the affected system.
The vulnerability exists due to an insecure link following issue when extracting data from an archive in the tarfile module. A remote attacker can pass a specially crafted archive to the application and overwrite arbitrary files outside the destination directory.
3) Link following (CVE-ID: CVE-2025-4138)
The vulnerability allows a remote attacker to compromise the affected system.
The vulnerability exists due to an insecure link following issue when extracting data from an archive in the tarfile module. A remote attacker can pass a specially crafted archive to the application and overwrite arbitrary files outside the destination directory during extraction with filter="data"..
4) Path traversal (CVE-ID: CVE-2024-12718)
The vulnerability allows a remote attacker to modify arbitrary files on the system.
The vulnerability exists due to input validation error in the tarfile module. A remote attacker can pass a specially crafted archive to the application and modify some file metadata (e.g. last modified) with filter="data" or file permissions (chmod) with filter="tar" of files outside the extraction directory.
5) Expected behavior violation (CVE-ID: CVE-2025-4435)
The vulnerability allows a remote attacker to change expected behavior.
The vulnerability exists due to an error when using a TarFile.errorlevel = 0 and extracting with a filter the documented behavior. A remote attacker can force the application to extract files that were meant to be skipped.
6) Use-after-free (CVE-ID: CVE-2025-4516)
The vulnerability allows a remote attacker to perform a denial of service (DoS) attack.
The vulnerability exists due to a use-after-free error when using the bytes.decode("unicode_escape", error="ignore|replace") function call. A remote attacker can pass a specially crafted input to the application and perform a denial of service (DoS) attack.
Remediation
Install update from vendor's website.
References
- https://gist.github.com/sethmlarson/52398e33eff261329a0180ac1d54f42f
- https://github.com/python/cpython/commit/19de092debb3d7e832e5672cc2f7b788d35951da
- https://github.com/python/cpython/commit/28463dba112af719df1e8b0391c46787ad756dd9
- https://github.com/python/cpython/commit/3612d8f51741b11f36f8fb0494d79086bac9390a
- https://github.com/python/cpython/commit/4633f3f497b1ff70e4a35b6fe2c907cbe2d4cb2e
- https://github.com/python/cpython/commit/9c1110ef6652687d7c55f590f909720eddde965a
- https://github.com/python/cpython/commit/9e0ac76d96cf80b49055f6d6b9a6763fb9215c2a
- https://github.com/python/cpython/commit/aa9eb5f757ceff461e6e996f12c89e5d9b583b01
- https://github.com/python/cpython/commit/dd8f187d0746da151e0025c51680979ac5b4cfb1
- https://github.com/python/cpython/issues/135034
- https://github.com/python/cpython/pull/135037
- https://mail.python.org/archives/list/security-announce@python.org/thread/MAXIJJCUUMCL7ATZNDVEGGHUMQMUUKLG/
- https://github.com/python/cpython/issues/127987
- http://www.openwall.com/lists/oss-security/2025/05/16/4
- http://www.openwall.com/lists/oss-security/2025/05/19/1
- https://github.com/python/cpython/commit/4398b788ffc1f954a2c552da285477d42a571292
- https://github.com/python/cpython/commit/6279eb8c076d89d3739a6edb393e43c7929b429d
- https://github.com/python/cpython/commit/69b4387f78f413e8c47572a85b3478c47eba8142
- https://github.com/python/cpython/commit/73b3040f592436385007918887b7e2132aa8431f
- https://github.com/python/cpython/commit/8d35fd1b34935221aff23a1ab69a429dd156be77
- https://github.com/python/cpython/commit/9f69a58623bd01349a18ba0c7a9cb1dad6a51e8e
- https://github.com/python/cpython/commit/ab9893c40609935e0d40a6d2a7307ea51aec598b
- https://github.com/python/cpython/issues/133767
- https://github.com/python/cpython/pull/129648
- https://mail.python.org/archives/list/security-announce@python.org/thread/L75IPBBTSCYEF56I2M4KIW353BB3AY74/