Skip to content
Noroxi
OSV ecosystem advisory

GHSA-6fqw-j3vm-7f66: Zendframework1 Potential SQL injection in ORDER and GROUP functions

CriticalCVSS 9.8 · v3.1—No exploit Fix available

Noroxi assessment

Priority: Monitor (action score 39/100)

  • The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
  • Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
  • Fixed version: zendframework/zendframework1 (Packagist) 1.12.20.

Low priority for now. Upgrade to zendframework/zendframework1 (Packagist) 1.12.20 or later.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: OSV

The implementation of ORDER BY and GROUP BY in Zend_Db_Select remained prone to SQL injection when a combination of SQL expressions and comments were used. This security patch provides a comprehensive solution that identifies and removes comments prior to checking validity of the statement to ensure no SQLi vectors occur. The implementation of ORDER BY and GROUP BY in Zend_Db_Select of ZF1 is vulnerable by the following SQL injection: ``` $db = Zend_Db::factory(/* options here */); $select = new Zend_Db_Select($db); $select->from('p'); $select->order("MD5(\"a(\");DELETE FROM p2; #)"); // same with group() ``` The above $select will render the following SQL statement: ``` SELECT `p`.* FROM `p` ORDER BY MD5("a(");DELETE FROM p2; #) ASC ``` instead of the correct one: ``` SELECT "p".* FROM "p" ORDER BY "MD5(""a("");DELETE FROM p2; #)" ASC ``` This security fix can be considered an improvement of the previous ZF2016-02 and ZF2014-04 advisories. As a final consideration, we recommend developers either never use user input for these operations, or filter user input thoroughly prior to invoking Zend_Db. You can use the Zend_Db_Select::quoteInto() method to filter the input data, as shown in this example: ``` $db = Zend_Db::factory(...); $input = "MD5(\"a(\");DELETE FROM p2; #)"; // user input can be an attack $order = $db->quoteInto("SQL statement for ORDER", $input); $select = new Zend_Db_Select($db); $select->from('p'); $select->order($order); // same with group() ```

Published
Jun 7, 2024
Updated
Dec 4, 2024
EPSS
—

Report tools

JSON

Action score

39

Monitor

Low priority for now.

CVSS
39 / 40 · 9.8 / 10
CISA KEV
0 / 30 · Not listed
EPSS
0 / 30 · —

Get told when this record changes

  • Not in KEV: no record of exploitation in the wild
  • No public exploit code on record
  • A fix has been released

If any of these changes, we'll tell you in the daily email digest.

Follow GHSA-6fqw-j3vm-7f66

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits every 10 minutes on paid plans, on the hour on the free plan.

Your free account also gets you

  • CVE alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools, at most 30 a day (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools
Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
Packagistzendframework/zendframework1

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Packagistzendframework/zendframework1before 1.12.201.12.20

Other highest-scoring records for the same primary product.

  • GHSA-v42g-7q2x-cw32Zendframework1 potential SQL injection vector using null byte for PDO (MsSql, SQLite)
    39Monitor
  • GHSA-2x36-qhx3-7m5fZendFramework1 Potential SQL injection in the ORDER implementation of Zend_Db_Select
    39Monitor
  • GHSA-mhpx-3rv8-wrjmZendFramework potential XML eXternal Entity injection vectors
    39Monitor

Published before and after this one in the same product

  • ← EarlierGHSA-9v78-h226-2rmqJun 7, 2024 · Zendframework potential security issue in login mechanism
    30Monitor
  • ← EarlierGHSA-8xhv-gqm4-3w99Jun 7, 2024 · ZendFramework1 Potential Insufficient Entropy Vulnerability
    30Monitor
  • ← EarlierGHSA-848f-mph5-9pm9Jun 7, 2024 · Zendframework Potential Information Disclosure and Insufficient Entropy vulnerability
    30Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
Packagist:zendframework/zendframework11.12.20Package registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

  • GHSA-2x36-qhx3-7m5f0 days apartZendFramework1 Potential SQL injection in the ORDER implementation of Zend_Db_Select
    39Monitor
  • GHSA-qf36-fx9f-232x0 days apartZendFramework potential SQL Injection Vector When Using PDO_MySql
    39Monitor
  • GHSA-v42g-7q2x-cw320 days apartZendframework1 potential SQL injection vector using null byte for PDO (MsSql, SQLite)
    39Monitor

Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · public bounty program.

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • No account or password is required.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
high · data can be read
Integrity
high · data or configuration can be modified
Availability
high · the service can be disrupted
Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality impact
High
Integrity impact
High
Availability impact
High

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

osv

Root cause

The query text is built by concatenating user input. The database cannot tell where the data ends and the command begins.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

ts
const owner = req.query.owner;const rows = await db.query(  "SELECT * FROM files WHERE owner = '" + owner + "'");

Fixed

ts
const owner = req.query.owner;const rows = await db.query(  "SELECT * FROM files WHERE owner = $1",  [owner]);

References

Show all references (2 more)

Vendor advisories and official records. Exploit/PoC links are deliberately left out.

All records