Reflected Cross-Site Scripting (XSS) Vulnerability in php5

php5 Updated 02 Oct 2025

Summary

20/01/2018
N/A
Yes i
Unrated
Not published

DLA-1251-1: php5 - security update. Affects php5 versions < 5.4.45-0+deb7u12. Fixed in 5.4.45-0+deb7u12. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

PHP5 is a popular scripting language used for web development. It provides a wide range of functionality and is commonly used to create dynamic web pages. However, a vulnerability has been discovered in PHP5 that allows for reflected cross-site scripting (XSS) attacks on the PHAR 404 error page. This vulnerability can be exploited by manipulating the URI of a request for a .phar file. It is important to note that this vulnerability is only exploitable if the web server is configured to handle phar files using PHP5.

Vulnerability Detail

The vulnerability in PHP5 allows an attacker to execute arbitrary JavaScript code in the context of a victim's browser. By manipulating the URI of a request for a .phar file, an attacker can inject malicious code into the PHAR 404 error page. When a victim visits this page, the injected code will be executed, potentially leading to various attacks such as session hijacking, data theft, or defacement of the website. This vulnerability can be particularly dangerous if the affected website handles sensitive user information or performs actions on behalf of authenticated users.

How To Fix

Minimum fixed version

5.4.45-0+deb7u12

This is the first release that contains the fix.

sudo apt-get install --only-upgrade php5

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

Workaround

If upgrading the php5 package is not immediately feasible, a temporary workaround is to disable the handling of phar files by PHP5 in the web server configuration. This can be achieved by removing or commenting out the relevant configuration directives related to phar files in the server's configuration file. However, it is important to note that this workaround may impact the functionality of applications that rely on the handling of phar files.

Conclusion

The vulnerability in PHP5 that allows for reflected cross-site scripting (XSS) attacks on the PHAR 404 error page can have serious security implications for affected websites. It is crucial to upgrade the php5 package to the fixed version or apply the provided workaround to mitigate the risk of exploitation. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for php5 →

Share this vulnerability

FAQ

A reflected XSS attack is a type of web vulnerability where an attacker injects malicious code into a website that is then executed by the victim's browser. The injected code is typically included in a URL or other input that is reflected back to the user.

An attacker can exploit this vulnerability by manipulating the URI of a request for a .phar file. By injecting malicious code into the PHAR 404 error page, the attacker can trick victims into executing the code when they visit the page.

The consequences of this vulnerability can vary depending on the specific context in which it is exploited. However, potential consequences include session hijacking, data theft, defacement of the website, and the execution of arbitrary code in the victim's browser.

No, this vulnerability is specific to the php5 package and can affect any system where the web server is configured to handle phar files using PHP5. However, the fix provided in this advisory is applicable to the Debian 7 Wheezy distribution.

At the time of this advisory, there are no known public exploits for this vulnerability. However, it is important to apply the recommended fix as soon as possible to mitigate the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for php5.

How To Fix

Minimum fixed version

5.4.45-0+deb7u12

This is the first release that contains the fix.

sudo apt-get install --only-upgrade php5

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