SQL Injection Vulnerability in ZendFramework

zendframework/zendframework Updated 02 Oct 2025

Summary

07/06/2024
HIGH
Yes i
High
8.8

GHSA-x2f4-8wxf-w3vf: ZendFramework SQL injection due to execution of platform-specific SQL containing interpolations. Affects zendframework/zendframework across 2 version ranges.

>= 2.0.0, < 2.0.8 >= 2.1.0, < 2.1.4

Fixed in 2.0.8 or 2.1.4, depending on the release line you run. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

ZendFramework is an open-source PHP framework that provides a platform for developing web applications. It includes the Zend\Db component, which offers platform abstraction for SQL operations. This vulnerability affects versions 2.0.0 to 2.0.8 and 2.1.0 to 2.1.4 of the zendframework/zendframework package.

Vulnerability Detail

The vulnerability arises from a flaw in the quoteValue() and quoteValueList() methods of the Zend\Db\Adapter\Platform* objects. These methods are used for manually quoting values in SQL statements, but they do not properly escape all characters that need to be escaped. Additionally, they do not coordinate with extension level character-sets when quoting. This can lead to SQL injection attacks, allowing malicious actors to execute arbitrary SQL statements.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 2.0.0, < 2.0.8 2.0.8
    composer require zendframework/zendframework:2.0.8
  • >= 2.1.0, < 2.1.4 2.1.4
    composer require zendframework/zendframework:2.1.4

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no known workaround for this vulnerability.

Conclusion

The SQL injection vulnerability in ZendFramework's Zend\Db component can lead to the execution of arbitrary SQL statements. It is crucial to upgrade to the fixed versions of the zendframework/zendframework package to mitigate this vulnerability.

See every vulnerability recorded for zendframework/zendframework →

Share this vulnerability

FAQ

This vulnerability allows attackers to execute arbitrary SQL statements, potentially leading to unauthorized access, data manipulation, or data loss.

No, only versions 2.0.0 to 2.0.8 and 2.1.0 to 2.1.4 of the zendframework/zendframework package are affected.

Yes, upgrading to version 2.0.9 or later for versions 2.0.0 to 2.0.8, and upgrading to version 2.1.5 or later for versions 2.1.0 to 2.1.4 will fix the vulnerability.

No, there is no known workaround for this vulnerability.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply upload your composer.lock file and it will analyze the dependencies for vulnerabilities.

Related vulnerabilities

Recent vulnerabilities recorded for zendframework/zendframework.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 2.0.0, < 2.0.8 2.0.8
    composer require zendframework/zendframework:2.0.8
  • >= 2.1.0, < 2.1.4 2.1.4
    composer require zendframework/zendframework:2.1.4

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. 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