Session Validation Flaw in Zend-Session Package: A Security Concern

zendframework/zend-session Updated 02 Oct 2025

Summary

07/06/2024
MODERATE
Yes i
Moderate
6.5

GHSA-96c6-m98x-hxjx: Zend-Session session validation vulnerability. Affects zendframework/zend-session across 2 version ranges.

>= 2.0.0, < 2.2.9 >= 2.3.0, < 2.3.4

Fixed in 2.2.9 or 2.3.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 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-Session is a component of the Zend Framework, designed to manage user sessions in PHP applications. It provides features such as session storage, session validation, and the ability to attach custom validators to enhance security. However, a recent vulnerability has been identified that affects the session validation process, potentially allowing attackers to bypass security measures.

Vulnerability Detail

The vulnerability arises from the improper functioning of session validators in the Zend-Session package when they are set before starting a session. Specifically, if validators like RemoteAddr are attached before the session starts, they do not retain the necessary metadata in the session. This oversight means that subsequent session starts do not carry over the validation checks, allowing attackers to exploit this flaw by circumventing session validation mechanisms, such as ignoring checks for the user's IP address or user agent.

How To Fix

Fixed versions by release line

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

  • >= 2.0.0, < 2.2.9 2.2.9
    composer require zendframework/zend-session:2.2.9
  • >= 2.3.0, < 2.3.4 2.3.4
    composer require zendframework/zend-session:2.3.4

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

Workaround

As a temporary workaround, developers can ensure that session validators are attached after the session has been started. For example, the following code snippet demonstrates how to properly attach a validator after starting the session:

$this->manager->start();
$this->manager->getValidatorChain()->attach('session.validate', array(new RemoteAddr(), 'isValid'));

Conclusion

The Zend-Session vulnerability presents a significant risk by allowing attackers to bypass session validation mechanisms. It is essential for developers using this package to update to the latest patched versions and implement recommended workarounds to secure their applications effectively.

See every vulnerability recorded for zendframework/zend-session →

Share this vulnerability

FAQ

The vulnerability allows attackers to bypass session validation, potentially leading to unauthorized access to user sessions.

You can use Vulert's playground to check if your application is affected by this vulnerability without needing to sign up.

Versions 2.0.0 to 2.2.8 and 2.3.0 to 2.3.3 of Zend-Session are affected by this vulnerability.

Implement the workaround by attaching session validators after starting the session to mitigate the risk temporarily.

The CVSS score for this vulnerability is 6.5, indicating a moderate severity level.

How To Fix

Fixed versions by release line

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

  • >= 2.0.0, < 2.2.9 2.2.9
    composer require zendframework/zend-session:2.2.9
  • >= 2.3.0, < 2.3.4 2.3.4
    composer require zendframework/zend-session:2.3.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