CVE-2017-16880: filp/whoops - Cross-site Scripting vulnerability

filp/whoops Updated 02 Oct 2025

Summary

17/05/2022
Yes i
Moderate
6.1

CVE-2017-16880: filp whoops Cross-site Scripting vulnerability. Affects filp/whoops versions < 2.1.13. Fixed in 2.1.13. 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

filp/whoops is a package available on Packagist that provides a nice and friendly error page when an error occurs in a PHP application. It is commonly used for debugging purposes and provides useful information to developers. However, versions before 2.1.13 of filp/whoops are vulnerable to a Cross-site Scripting (XSS) attack.

Vulnerability Detail

The vulnerability exists in the Util/TemplateHelper.php file of filp/whoops. The dump function in this file does not properly sanitize user input, allowing an attacker to inject malicious scripts into the error page. This can lead to the execution of arbitrary JavaScript code in the context of the victim's browser, potentially leading to session hijacking, data theft, or other malicious activities.

How To Fix

Minimum fixed version

2.1.13

This is the first release that contains the fix.

composer require filp/whoops:2.1.13

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

Workaround

If you are unable to immediately update filp/whoops to the fixed version, you can apply a temporary workaround by manually sanitizing user input before passing it to the dump function. Here's an example of how you can sanitize user input using the htmlspecialchars function in PHP:

$input = $_GET['input'];
$sanitizedInput = htmlspecialchars($input, ENT_QUOTES, 'UTF-8');

// Pass the sanitized input to the dump function
dump($sanitizedInput);

By properly sanitizing user input, you can prevent the execution of malicious scripts and mitigate the risk of XSS attacks.

Conclusion

The Cross-site Scripting vulnerability in filp/whoops before version 2.1.13 can allow an attacker to execute arbitrary JavaScript code in the context of a victim's browser. It is recommended to update the package to the latest version to fix this vulnerability. If immediate update is not possible, applying input sanitization can provide temporary mitigation. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for filp/whoops →

Share this vulnerability

FAQ

filp/whoops is a package that provides a friendly error page for PHP applications. It helps developers debug their code by displaying detailed error information.

Cross-site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. This can lead to the execution of arbitrary code in the victim's browser.

The vulnerability in filp/whoops allows an attacker to inject and execute arbitrary JavaScript code in the context of the victim's browser. This can lead to various malicious activities, such as session hijacking, data theft, or defacement of the error page.

To fix this vulnerability, you should update filp/whoops to version 2.1.13 or later. This version includes the necessary fixes to prevent the XSS attack. You can update the package by running composer update filp/whoops.

If you are unable to immediately update filp/whoops to the fixed version, you can manually sanitize user input before passing it to the dump function. This can help mitigate the risk of XSS attacks.

How To Fix

Minimum fixed version

2.1.13

This is the first release that contains the fix.

composer require filp/whoops:2.1.13

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