15-Year-Old Unpatched Python Vulnerability Potentially Affects Over 350,000 Projects

Share:

September 22, 2022 Ravie Lakshmanan

As many as 350,000 open source projects are believed to be potentially vulnerable to exploitation as a result of a security flaw in a Python module that has remained unpatched for 15 years.

The open source repositories span a number of industry verticals, such as software development, artificial intelligence/machine learning, web development, media, security, and IT management.

The shortcoming, tracked as CVE-2007-4559 (CVSS score: 6.8), is rooted in the tarfile module, successful exploitation of which could lead to code execution from an arbitrary file write.

 

“The vulnerability is a path traversal attack in the extract and extractall functions in the tarfile module that allow an attacker to overwrite arbitrary files by adding the ‘..’ sequence to filenames in a TAR archive,” Trellix security researcher Kasimir Schulz said in a writeup.

Originally disclosed in August 2007, the bug has to do with how a specially crafted tar archive can be leveraged to overwrite arbitrary files on a target machine simply upon opening the file.

Put simply, a threat actor can exploit the weakness by uploading a malicious tarfile in a manner that makes it possible to escape the directory that a file is intended to be extracted to and achieve code execution, allowing the adversary to potentially seize shoppingmode control of a target device.

“Never extract archives from untrusted sources without prior inspection,” the Python documentation for tarfile reads. “It is possible that files are created outside of path, e.g. members that have absolute filenames starting with ‘/’ or filenames with two dots ‘..’.”

 

The vulnerability is also reminiscent of a recently disclosed security flaw in RARlab’s UnRAR utility (CVE-2022-30333) that could lead to remote code execution.

Trellix has further released a custom utility called Creosote to scan for projects vulnerable to CVE-2007-4559, using it to uncover the vulnerability in the Spyder Python IDE as well as Polemarch.

Leave a Comment

Your email address will not be published. Required fields are marked *

loader-image
London, GB
1:43 am, Jun 1, 2025
weather icon 15°C
L: 14° | H: 16°
clear sky
Humidity: 78 %
Pressure: 1015 mb
Wind: 5 mph SSW
Wind Gust: 9 mph
UV Index: 0
Precipitation: 0 mm
Clouds: 4%
Rain Chance: 0%
Visibility: 10 km
Sunrise: 4:49 am
Sunset: 9:07 pm
DailyHourly
Daily ForecastHourly Forecast
Today 10:00 pm
weather icon
14° | 16°°C 0.2 mm 20% 15 mph 80 % 1015 mb 0 mm/h
Tomorrow 10:00 pm
weather icon
11° | 21°°C 0 mm 0% 12 mph 82 % 1019 mb 0 mm/h
Tue Jun 03 10:00 pm
weather icon
11° | 18°°C 1 mm 100% 15 mph 93 % 1013 mb 0 mm/h
Wed Jun 04 10:00 pm
weather icon
9° | 18°°C 0.48 mm 48% 12 mph 81 % 1011 mb 0 mm/h
Thu Jun 05 10:00 pm
weather icon
11° | 15°°C 1 mm 100% 16 mph 94 % 1011 mb 0 mm/h
Today 4:00 am
weather icon
13° | 15°°C 0 mm 0% 8 mph 80 % 1014 mb 0 mm/h
Today 7:00 am
weather icon
13° | 14°°C 0 mm 0% 10 mph 76 % 1015 mb 0 mm/h
Today 10:00 am
weather icon
17° | 17°°C 0 mm 0% 11 mph 45 % 1015 mb 0 mm/h
Today 1:00 pm
weather icon
20° | 20°°C 0 mm 0% 12 mph 37 % 1014 mb 0 mm/h
Today 4:00 pm
weather icon
20° | 20°°C 0 mm 0% 15 mph 39 % 1013 mb 0 mm/h
Today 7:00 pm
weather icon
18° | 18°°C 0.2 mm 20% 11 mph 57 % 1014 mb 0 mm/h
Today 10:00 pm
weather icon
15° | 15°°C 0 mm 0% 8 mph 72 % 1015 mb 0 mm/h
Tomorrow 1:00 am
weather icon
13° | 13°°C 0 mm 0% 7 mph 82 % 1016 mb 0 mm/h
Name Price24H (%)
Bitcoin(BTC)
€92,075.48
0.38%
Ethereum(ETH)
€2,221.64
-0.25%
Tether(USDT)
€0.88
0.00%
XRP(XRP)
€1.91
1.48%
Solana(SOL)
€137.68
-0.13%
USDC(USDC)
€0.88
-0.01%
Dogecoin(DOGE)
€0.169035
-0.46%
Shiba Inu(SHIB)
€0.000011
0.67%
Pepe(PEPE)
€0.000011
0.46%
Peanut the Squirrel(PNUT)
€0.229552
4.69%
Scroll to Top