CVE-2015-0270: Zend Framework Allows SQL Injection

zendframework/zendframework Updated 02 Oct 2025

Summary

24/05/2022
Yes i
Critical
9.8

CVE-2015-0270: Zend Framework Allows SQL Injection. Affects zendframework/zendframework across 2 version ranges.

< 2.2.10 >= 2.3.0, < 2.3.5

Fixed in 2.2.10 or 2.3.5, 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 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

Zend Framework is a popular open-source PHP framework that provides a collection of professional PHP packages for developing web applications. It offers a wide range of features and components to simplify the development process and enhance application security. However, versions before 2.2.10 and 2.3.x before 2.3.5 are vulnerable to a potential SQL injection attack when using the PostgreSQL Zend\Db adapter.

Vulnerability Detail

The vulnerability in Zend Framework allows an attacker to inject malicious SQL queries into the PostgreSQL database. This can lead to unauthorized access, data manipulation, or even complete compromise of the database. The vulnerability arises due to improper input sanitization and lack of prepared statements in the affected versions of the framework. An attacker can exploit this vulnerability by crafting specially crafted input that is not properly validated or escaped by the framework.

How To Fix

Fixed versions by release line

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

  • < 2.2.10 2.2.10
    composer require zendframework/zendframework:2.2.10
  • >= 2.3.0, < 2.3.5 2.3.5
    composer require zendframework/zendframework:2.3.5

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

Workaround

If upgrading to the latest version is not immediately feasible, a temporary workaround is to manually sanitize and validate user input before using it in database queries. This can be achieved by using prepared statements or parameterized queries, which ensure that user input is properly escaped and treated as data rather than executable code. Here's an example of using prepared statements with the Zend\Db adapter:

$adapter = new Zend\Db\Adapter\Adapter($config);
$statement = $adapter->createStatement('SELECT * FROM users WHERE id = ?');
$statement->execute([$userId]);
$result = $statement->fetchAll();

Conclusion

In conclusion, the vulnerability in Zend Framework before version 2.2.10 and 2.3.x before 2.3.5 allows SQL injection in the PostgreSQL Zend\Db adapter. It is crucial to upgrade to the latest patched version of the framework to mitigate this vulnerability. Additionally, implementing proper input validation and using prepared statements can provide an immediate workaround until the upgrade is performed. For further support and assistance in vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for zendframework/zendframework →

Share this vulnerability

FAQ

Zend Framework is an open-source PHP framework that provides a collection of professional PHP packages for developing web applications. It offers a wide range of features and components to simplify the development process and enhance application security.

SQL injection is a type of security vulnerability that allows an attacker to manipulate SQL queries executed by a web application. By injecting malicious SQL code, an attacker can bypass authentication, access unauthorized data, modify or delete data, or even execute arbitrary commands on the underlying database.

The potential consequences of this vulnerability include unauthorized access to sensitive data, data manipulation or deletion, and complete compromise of the affected database. An attacker can exploit this vulnerability to extract confidential information, modify data, or perform other malicious actions.

You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities in software using just the composer.lock file, without requiring access to the code or installation.

You can find more information about this vulnerability, including its technical details and the affected versions, in the vulnerability advisory on GitHub: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/05/GHSA-v59p-p692-v382/GHSA-v59p-p692-v382.json

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.2.10 2.2.10
    composer require zendframework/zendframework:2.2.10
  • >= 2.3.0, < 2.3.5 2.3.5
    composer require zendframework/zendframework:2.3.5

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