Critical File Overwrite Vulnerability in php-pear: Archive_Tar Package

php-pear Updated 02 Oct 2025

Summary

19/11/2020
N/A
Yes i
High
7.8

CVE-2020-28949: Archive_Tar through 1.4.10 has :// filename sanitization only to address phar attacks, and thus any other stream-wrapper attack (such as file:// to overwrite files) can still succeed. Affects php-pear across 3 version ranges.

< 1:1.10.9+submodules+notgz-1.1 < 19bb8e95490d3e3ad92fcac95500ca80bdcc7495 >= 497914920385b7016ac9c9367e0198530787adf2, < 98b9dd73fb606159242c98a57aa9068d8fa3328d

Fixed in 1:1.10.9+submodules+notgz-1.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The php-pear package is a widely used PHP extension that provides a framework and distribution system for reusable PHP components. The Archive_Tar component within php-pear allows for the creation and manipulation of tar archives. However, it has been found to have a critical vulnerability that can lead to unauthorized file overwrites, posing significant security risks to applications relying on this package.

Vulnerability Detail

The vulnerability, identified as CVE-2020-28949, arises from inadequate filename sanitization in the Archive_Tar component. While it addresses phar attacks, it fails to mitigate other stream-wrapper attacks, such as file://, which can be exploited to overwrite files on the server. This oversight can lead to severe consequences, including data loss, unauthorized access, and potential system compromise. The vulnerability affects multiple versions of the php-pear package across various Debian ecosystems.

How To Fix

Minimum fixed version

1:1.10.9+submodules+notgz-1.1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade php-pear

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can restrict access to the affected files and directories or implement additional input validation to prevent malicious file paths from being processed. However, upgrading the package is the recommended solution.

Conclusion

The CVE-2020-28949 vulnerability in the php-pear package's Archive_Tar component poses a significant risk due to inadequate filename sanitization. Users are strongly advised to upgrade to the latest version to mitigate potential threats and ensure the security of their applications.

See every vulnerability recorded for php-pear →

Share this vulnerability

FAQ

CVE-2020-28949 is a vulnerability in the Archive_Tar component of the php-pear package that allows attackers to exploit filename sanitization issues, potentially leading to file overwrites.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The vulnerability can lead to unauthorized file overwrites, data loss, and potential system compromise, posing significant security risks to applications.

While upgrading is the best solution, you can implement additional input validation and restrict access to affected files as a temporary workaround.

The CVSS score of CVE-2020-28949 is 7.8, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for php-pear.

How To Fix

Minimum fixed version

1:1.10.9+submodules+notgz-1.1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade php-pear

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback