Skip to main content

Z-Push CVE-2025-8264

HIGH
SQL Injection (CWE-89)
2025-07-29 report@snyk.io
7.9
CVSS 4.0 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send HTTP request with SQL payload in Authorization username
  2. Delivery
    Z-Push IMAP backend processes authentication
  3. Exploit
    Malicious username concatenated into SQL query
  4. Execution
    Injected SQL executes on third-party database
  5. Impact
    Exfiltrate or modify database contents

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

IMAP backend must be enabled AND IMAP_FROM_SQL_QUERY configuration option must be explicitly set in backend/imap/config.php to query an external SQL database for user identity resolution. Default Z-Push installations using IMAP_DEFAULTFROM with empty string or LDAP settings are NOT vulnerable - the SQL injection code path only executes when administrators have configured SQL database queries. The attacker must be able to send HTTP requests with manipulated Authorization headers to the Z-Push server (network reachability required), but no valid credentials are needed since the injection occurs during authentication processing before credential validation. The linked third-party SQL database must be accessible to the Z-Push server and the database user must have permissions beyond SELECT (UPDATE/DELETE/INSERT) for full exploitation impact, though data exfiltration is possible with SELECT-only access.

Impact

Real-world risk is moderate despite the 7.9 CVSS score due to significant limiting factors. CVSS vector shows AV:N/AC:L/PR:N (network-accessible, unauthenticated), but AT:P (Present attack requirements) acknowledges the configuration prerequisite. The vulnerability requires administrators to have configured the non-default IMAP_FROM_SQL_QUERY option, which queries external databases - many Z-Push deployments use default settings or LDAP instead. CVSS 4.0 Environmental scores (VC:N/VI:H/VA:N) indicate no confidentiality impact to the vulnerable system itself, but high integrity impacts to subsequent systems (SC:H/SI:H/SA:H), reflecting that the attacker targets the linked third-party database, not Z-Push's own data store. Exploit maturity is rated E:P (POC available) based on GitHub PR #161 containing proof-of-concept code and the Xbow security blog post documenting exploitation. No EPSS or CISA KEV data provided, suggesting limited observed exploitation in the wild. The attack is automatable once configuration conditions are met (basic auth parsing requires no user interaction), but the configuration prerequisite significantly reduces the population of vulnerable systems. Priority should be HIGH for organizations running Z-Push with IMAP_FROM_SQL_QUERY configured, MEDIUM for those planning such configurations, and LOW for default/LDAP configurations.

Exploit ScenarioDerived

An attacker identifies a Z-Push server using IMAP backend with SQL-based user identity queries (via configuration fingerprinting or reconnaissance). They craft an HTTP request with a malicious username in the Authorization header, such as 'admin' UNION SELECT password FROM admin_users WHERE '1'='1. When Z-Push processes the authentication attempt, the IMAP backend's user_identity.php code constructs an SQL query by directly concatenating the malicious username, executing the injected UNION statement against the linked third-party database. The attacker extracts sensitive data in the response or uses INSERT/UPDATE/DELETE statements to modify database records. GitHub PR #161 provides working proof-of-concept code demonstrating this attack vector.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 29, 2026

SQL injection in Z-Push IMAP backend allows unauthenticated remote attackers to access, modify, or delete data in linked third-party databases via malicious username values in basic authentication headers. Exploitation requires non-default IMAP_FROM_SQL_QUERY configuration. Publicly available exploit code exists (GitHub PR #161 demonstrates the vulnerability). CVSS 7.9 with network attack vector and no authentication required, though attack complexity increases due to the specific configuration prerequisite. Affects Z-Push versions before 2.7.6.

RemediationAI

Upgrade to Z-Push version 2.7.6 or later, which implements parameterized queries in the IMAP backend user identity code (fix available via GitHub PR #161, commit f981d515a35ac4c303959af21dce880a5db02786). For systems that cannot immediately upgrade, remove SQL injection attack surface by changing backend/imap/config.php to use default settings (define('IMAP_DEFAULTFROM', '');) or LDAP-based identity resolution (define('IMAP_DEFAULTFROM', 'ldap');) instead of IMAP_FROM_SQL_QUERY. This configuration change eliminates the vulnerable code path entirely but impacts functionality for deployments that rely on SQL database queries for user email address resolution - organizations must ensure alternative identity resolution mechanisms meet their operational requirements. If SQL-based identity resolution is business-critical and patching is delayed, implement input validation at the web server or reverse proxy layer to sanitize HTTP Authorization headers, though this is complex and error-prone compared to patching. Monitor database query logs for suspicious username patterns (SQL keywords, comment sequences, UNION statements) as a detection control. Vendor patch details: https://github.com/Z-Hub/Z-Push/pull/161.

Affected Packages

composer z-push/z-push-dev fix: 2.7.6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in composer

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Z-Push is a PHP-based open-source implementation of the Microsoft ActiveSync protocol for mobile device synchronization with email servers. The vulnerability resides in the IMAP backend component (backend/imap/user_identity.php, lines 211-214), where username values from HTTP basic authentication are directly interpolated into SQL queries without parameterization when IMAP_FROM_SQL_QUERY is configured. This represents a classic CWE-89 SQL injection flaw where user-controlled input (the username field in Authorization headers) flows unsanitized into database operations. The IMAP backend's user identity feature allows querying external SQL databases to retrieve email addresses for users, but the query construction lacks prepared statements or input validation. The vulnerable code path only executes when administrators have explicitly configured IMAP_FROM_SQL_QUERY to query a third-party database rather than using default settings or LDAP.

Know when PHP gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 7.9 HIGH
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H/E:P

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

DescriptionCVE.org

Versions of the package z-push/z-push-dev before 2.7.6 are vulnerable to SQL Injection due to unparameterized queries in the IMAP backend. An attacker can inject malicious commands by manipulating the username field in basic authentication. This allows the attacker to access and potentially modify or delete sensitive data from a linked third-party database. Note: This vulnerability affects Z-Push installations that utilize the IMAP backend and have the IMAP_FROM_SQL_QUERY option configured. Mitigation Change configuration to use the default or LDAP in backend/imap/config.php php define('IMAP_DEFAULTFROM', ''); or php define('IMAP_DEFAULTFROM', 'ldap');

Executive ViewAI

Why It Matters

CVE-2025-8264 is a critical SQL injection vulnerability in Z-Push's IMAP backend that allows unauthenticated attackers to access, modify, or delete data in connected databases when non-default SQL query configurations are enabled. Organizations using Z-Push for email synchronization with custom IMAP_FROM_SQL_QUERY settings face direct risk to data confidentiality, integrity, and availability across linked third-party systems. Immediate inventory and configuration review is essential to determine exposure scope.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable IMAP_FROM_SQL_QUERY configuration if operationally feasible; (2) Implement network segmentation to restrict unauthenticated access to Z-Push IMAP backend services; (3) Deploy Web Application Firewall rules to block SQL injection patterns in authentication headers; (4) Enable detailed logging and monitoring of authentication attempts and database queries for forensic detection.

Threat Intelligence Overview

EPSS Score
0.1%
Top 70% exploitable
Data Quality
3 sources
Confidence: Low

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

40
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +40
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy