high CVSS 8.8

CVE-2026-56425·PHP vulnerability

The Azure Active Directory (AAD) authentication implementation contained multiple weaknesses in its OAuth 2.0 authorization flow that could allow attackers to bypass important security guarantees provided by the protocol. The application used the PHP session identifier (session_id()) as the OAuth state parameter. Because session identifiers are long-lived authentication credentials, exposing them in OAuth redirect URLs could leak valid session tokens through browser history, HTTP Referer headers, reverse proxies, access logs, or third-party infrastructure involved in the authentication flow. If obtained by an attacker, the leaked session identifier could potentially be used for session hijacking. Additionally, the implementation did not regenerate the session identifier after successful authentication, leaving authenticated sessions susceptible to session fixation attacks where an attacker forces a victim to use a known session identifier before login and later reuses that identifier after authentication. The OAuth state value was also not implemented as a dedicated, single-use nonce. This weakened CSRF protections and increased the risk of replay attacks against the OAuth callback process. The authentication flow further failed to enforce HTTPS for the configured OAuth redirect URI. If a non-HTTPS redirect URI was used, OAuth authorization codes and access tokens could traverse the network in plaintext, exposing sensitive credentials to network attackers. Finally, OAuth error responses containing attacker-controlled GET parameters were logged verbatim. An attacker could inject control characters or crafted log content, leading to log forging, log injection, or corruption of audit records. The fix introduces: * A dedicated cryptographically random OAuth state value. * Single-use state validation and invalidation. * Constant-time state comparison using hash_equals(). * Session identifier rotation after successful authentication. * Enforcement of HTTPS-only redirect URIs. * Sanitized and length-limited logging of OAuth error parameters. AAD Authentication Plugin (OAuth 2.0 / Azure Active Directory integration)

Severity
high
Software
PHP
Fixed in
2.5.42
Published
2026-06-22

Affected versions

Until: 2.5.42

Fixed in: 2.5.42

How to fix this CVE

Upgrade PHP to version 2.5.42 or later to patch critical OAuth 2.0 authentication flaws in the Azure Active Directory integration. This update addresses session fixation, state parameter validation, HTTPS enforcement, and log injection vulnerabilities that could enable session hijacking and credential exposure. Apply the update immediately to all production and staging environments running affected PHP versions.

sudo dnf update php

Defensia detects this vulnerability

What an exploitation attempt looks like

Sample log line indicative of exploitation attempts:

GET requests to OAuth callback endpoints containing `state` parameters matching PHP session ID patterns (e.g., `state=[a-f0-9]{26}` or `state=PHPSESSID_*`); HTTP Referer headers leaking OAuth authorization codes or session tokens; POST requests to error handlers with unencoded `error` parameters containing newlines or control characters

WAF mitigation (if patching is not yet possible)

Add this rule to your WAF to block exploitation attempts while you schedule the patch.

Block OAuth callback requests with non-HTTPS origins; reject state parameters that do not match expected random token format; sanitize and truncate error parameters in OAuth error responses to prevent log injection; enforce HTTPS-only redirect URIs and reject HTTP redirects during OAuth flows

How to check if you are affected

  1. Run `php -v` to check your current PHP version; CVE-2026-56425 affects versions below 2.5.42
  2. Check if the Azure Active Directory authentication plugin is installed by running `php -m | grep -i aad` or examining your PHP configuration files in `/etc/php/*/conf.d/`
  3. Search application logs for OAuth redirect URLs containing session identifiers by grepping for patterns like `state=PHPSESSID` or `oauth.*session` in `/var/log/apache2/access.log` or `/var/log/nginx/access.log`
  4. After upgrading, verify the fix by running `php -v` again and confirming version 2.5.42 or higher is installed; restart PHP-FPM with `sudo systemctl restart php-fpm` and monitor authentication logs for errors

FAQ

What is CVE-2026-56425?

CVE-2026-56425 is a high-severity vulnerability in PHP's Azure Active Directory OAuth 2.0 implementation that exposes session identifiers in redirect URLs, fails to rotate session tokens, and lacks proper state validation, enabling session hijacking, CSRF attacks, and log injection.

Is CVE-2026-56425 being actively exploited?

No, this vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities catalog and no public exploits are available, though the attack vectors are straightforward and organizations should prioritize patching.

What versions of PHP are affected by CVE-2026-56425?

All PHP versions up to and including 2.5.41 are affected; version 2.5.42 and later contain the security fixes.

How do I check if my server is vulnerable to CVE-2026-56425?

Run `php -v` to check your version; if it returns a version lower than 2.5.42, your server is vulnerable. Also verify that the Azure Active Directory authentication module is active by checking `php -m` output or configuration files in `/etc/php/`.

Does Defensia detect CVE-2026-56425?

Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PHP is installed on a monitored server, CVE-2026-56425 will appear in your dashboard with remediation steps.

Related PHP CVEs

CVE-2026-28289CVSS 10FreeScout is a free help desk and shared inbox built with PHP's Laravel framework. A patch bypass vulnerability for CVE-2026-27636 in FreeScout 1.8.206 and earlier allows any authenticated user with file upload permissions to achieve Remote Code Execution (RCE) on the server by uploading a malicious .htaccess file using a zero-width space character prefix to bypass the security check. The vulnerability exists in the sanitizeUploadedFileName() function in app/Http/Helper.php. The function contains a Time-of-Check to Time-of-Use (TOCTOU) flaw where the dot-prefix check occurs before sanitization removes invisible characters. This vulnerability is fixed in 1.8.207.
CVE-2025-46348CVSS 10YesWiki is a wiki system written in PHP. Prior to version 4.5.4, the request to commence a site backup can be performed and downloaded without authentication. The archives are created with a predictable filename, so a malicious user could create and download an archive without being authenticated. This could result in a malicious attacker making numerous requests to create archives and fill up the file system, or by downloading the archive which contains sensitive site information. This issue has been patched in version 4.5.4.
CVE-2025-47916CVSS 10Invision Community 5.0.0 before 5.0.7 allows remote code execution via crafted template strings to themeeditor.php. The issue lies within the themeeditor controller (file: /applications/core/modules/front/system/themeeditor.php), where a protected method named customCss can be invoked by unauthenticated users. This method passes the value of the content parameter to the Theme::makeProcessFunction() method; hence it is evaluated by the template engine. Accordingly, this can be exploited by unauthenticated attackers to inject and execute arbitrary PHP code by providing crafted template strings.
CVE-2025-25174CVSS 10Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulnerability in beeteam368 BeeTeam368 Extensions beeteam368-extensions allows PHP Local File Inclusion.This issue affects BeeTeam368 Extensions: from n/a through <= 1.9.4.
CVE-2025-62521CVSS 10ChurchCRM is an open-source church management system. Prior to version 5.21.0, a pre-authentication remote code execution vulnerability in ChurchCRM's setup wizard allows unauthenticated attackers to inject arbitrary PHP code during the initial installation process, leading to complete server compromise. The vulnerability exists in `setup/routes/setup.php` where user input from the setup form is directly concatenated into a PHP configuration template without any validation or sanitization. Any parameter in the setup form can be used to inject PHP code that gets written to `Include/Config.php`, which is then executed on every page load. This is more severe than typical authenticated RCE vulnerabilities because it requires no credentials and affects the installation process that administrators must complete. Version 5.21.0 patches the issue.

References

Track CVEs across your fleet automatically

Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-56425. Free for 1 server.

Get started free