Cross-site Scripting Vulnerability in Zend Framework

zendframework/zendframework Updated 02 Oct 2025

Summary

07/06/2024
MODERATE
Yes i
Moderate
6.1

GHSA-5gmf-3c43-q73v: ZendFramework vulnerable to Cross-site Scripting. Affects zendframework/zendframework versions >= 2.0.0, < 2.0.1. Fixed in 2.0.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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Zend Framework is an open-source framework for developing web applications and services in PHP. It provides a robust architecture and a set of components that facilitate the development of secure and maintainable applications. However, certain components of Zend Framework, such as Zend\Debug, Zend\Feed\PubSubHubbub, and others, have been found to be vulnerable to Cross-site Scripting (XSS) attacks due to improper escaping of HTML and URLs.

Vulnerability Detail

The vulnerability arises from the failure of several components within Zend Framework to utilize the Zend\Escaper for escaping HTML, HTML attributes, and URLs. Although some components performed escaping, they did not use context-appropriate mechanisms, making them susceptible to XSS attacks. This could allow attackers to inject malicious scripts into web pages viewed by users, potentially leading to data theft, session hijacking, or other malicious activities.

How To Fix

Minimum fixed version

2.0.1

This is the first release that contains the fix.

composer require zendframework/zendframework:2.0.1

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

Workaround

As a temporary workaround, ensure that any output generated by the affected components is properly escaped using Zend\Escaper. For example, you can manually escape output like this: '$escapedOutput = Zend\Escaper\Escaper::

escapeHtml($output);

'. This will help mitigate the risk of XSS until the package is updated.

Conclusion

The Cross-site Scripting vulnerability in Zend Framework poses a significant risk to applications using affected components. It is crucial to update to the latest version to mitigate this risk. Additionally, using proper escaping techniques can help protect against potential attacks.

See every vulnerability recorded for zendframework/zendframework →

Share this vulnerability

FAQ

XSS is a security vulnerability that allows attackers to inject malicious scripts into web pages viewed by users, potentially compromising user data and sessions.

Versions prior to 2.0.1 are affected by this vulnerability.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without needing to sign up.

Implement the workaround by manually escaping output using Zend\Escaper to reduce the risk of XSS until you can update the package.

The CVSS score of this vulnerability is 6.1, indicating a moderate level of severity.

Related vulnerabilities

Recent vulnerabilities recorded for zendframework/zendframework.

How To Fix

Minimum fixed version

2.0.1

This is the first release that contains the fix.

composer require zendframework/zendframework:2.0.1

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