/

CVE-2026-114724

Severity:

HIGH RISK

(7.4)

PHP Object Injection (CWE-502) in Roundcube Sessions

CVE-2026-114724

Analyzed

Vulnerability type

Category:

PHP Object Injection

CWE:

CWE-502

Impact:

PHP Object Injection and Potential Code Execution

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Roundcube Webmail contains an unsafe session deserialization flaw in rcube_session::unserialize() that can turn attacker-influenced session data into a PHP object injection primitive. If an attacker can affect stored session contents and a suitable application gadget chain is available, the issue could lead to unauthorized object behavior or further compromise.

Roundcube Webmail contains an unsafe session deserialization flaw in rcube_session::unserialize() that can turn attacker-influenced session data into a PHP object injection primitive. If an attacker can affect stored session contents and a suitable application gadget chain is available, the issue could lead to unauthorized object behavior or further compromise.

Affected context

The vulnerability occurs in Roundcube deployments that reconstruct serialized session data through rcube_session::unserialize(). A session key beginning with ! can be handled as though it has no value, causing the reconstructed serialized stream to become misaligned and allowing subsequent session data to be interpreted as a serialized value. Exploitation depends on the attacker being able to influence stored session data and on the resulting object being meaningful in the application context.

The vulnerability occurs in Roundcube deployments that reconstruct serialized session data through rcube_session::unserialize(). A session key beginning with ! can be handled as though it has no value, causing the reconstructed serialized stream to become misaligned and allowing subsequent session data to be interpreted as a serialized value. Exploitation depends on the attacker being able to influence stored session data and on the resulting object being meaningful in the application context.

Exploit preconditions

  • Attack surface: Roundcube session handling and PHP serialization
  • Required access: The ability to influence or place data in a stored Roundcube session
  • Trigger point: Deserialization of the affected session data by rcube_session::unserialize()
  • Why exploitation is possible: Specially handled session keys can desynchronize the reconstructed serialized stream, causing following data to be interpreted as an object value
  • Attack surface: Roundcube session handling and PHP serialization
  • Required access: The ability to influence or place data in a stored Roundcube session
  • Trigger point: Deserialization of the affected session data by rcube_session::unserialize()
  • Why exploitation is possible: Specially handled session keys can desynchronize the reconstructed serialized stream, causing following data to be interpreted as an object value

Why this happens

The underlying bug is unsafe deserialization combined with incorrect reconstruction of serialized session data. Treating a !-prefixed session key as having no corresponding value changes the structure of the serialized stream while still allowing subsequent data to be parsed. This maps to CWE-502: Deserialization of Untrusted Data, because attacker-influenced serialized content can reach PHP object reconstruction without sufficiently preserving structural and trust-boundary checks.

The underlying bug is unsafe deserialization combined with incorrect reconstruction of serialized session data. Treating a !-prefixed session key as having no corresponding value changes the structure of the serialized stream while still allowing subsequent data to be parsed. This maps to CWE-502: Deserialization of Untrusted Data, because attacker-influenced serialized content can reach PHP object reconstruction without sufficiently preserving structural and trust-boundary checks.

Potential impact

  • PHP objects could be instantiated from attacker-influenced session data
  • Application state or session behavior could be manipulated
  • Sensitive data could be exposed or altered
  • Server-side code execution could occur if a usable gadget chain is available
  • The Roundcube process or hosting environment could be compromised
  • PHP objects could be instantiated from attacker-influenced session data
  • Application state or session behavior could be manipulated
  • Sensitive data could be exposed or altered
  • Server-side code execution could occur if a usable gadget chain is available
  • The Roundcube process or hosting environment could be compromised

General mitigation guidance

Mitigation generally focuses on rejecting malformed or ambiguous session keys before serialized data is reconstructed and avoiding unsafe deserialization of attacker-influenced content.

Common defensive patterns include:

  • Rejecting reserved or structurally ambiguous key formats
  • Using explicit, validated session schemas rather than generic object deserialization
  • Treating all session data as untrusted at parsing boundaries
  • Separating session state from executable or object-bearing serialization formats
  • Running the webmail service with least privilege and restricting access to sensitive resources
  • Applying defense-in-depth controls around session storage integrity and confidentiality

Mitigation generally focuses on rejecting malformed or ambiguous session keys before serialized data is reconstructed and avoiding unsafe deserialization of attacker-influenced content.

Common defensive patterns include:

  • Rejecting reserved or structurally ambiguous key formats
  • Using explicit, validated session schemas rather than generic object deserialization
  • Treating all session data as untrusted at parsing boundaries
  • Separating session state from executable or object-bearing serialization formats
  • Running the webmail service with least privilege and restricting access to sensitive resources
  • Applying defense-in-depth controls around session storage integrity and confidentiality

How teams detect issues like this

Detection can include static analysis for PHP deserialization APIs and custom session reconstruction logic, with particular attention to code that concatenates serialized fragments or maps special key prefixes to structural behavior.

Code review should examine whether session values are validated before parsing, whether malformed keys are rejected consistently, and whether object instantiation can occur from user-influenced state. Runtime monitoring can alert on anomalous session mutations, unexpected serialized object markers, and access to session storage outside expected application paths. Automated security scanning and policy checks can help enforce safe deserialization patterns.

Detection can include static analysis for PHP deserialization APIs and custom session reconstruction logic, with particular attention to code that concatenates serialized fragments or maps special key prefixes to structural behavior.

Code review should examine whether session values are validated before parsing, whether malformed keys are rejected consistently, and whether object instantiation can occur from user-influenced state. Runtime monitoring can alert on anomalous session mutations, unexpected serialized object markers, and access to session storage outside expected application paths. Automated security scanning and policy checks can help enforce safe deserialization patterns.

Sources

SourceLink
bugs.debian.orgbugs.debian.org/1151279
github.comgithub.com/roundcube/roundcubemail/commit/833770d3d3c35cfde74cc2614d368f25a75b6f99
github.comgithub.com/roundcube/roundcubemail/commit/93284f3f0e13f99af37fc3b81861e142eea8a922
github.comgithub.com/roundcube/roundcubemail/releases/tag/1.6.20
github.comgithub.com/roundcube/roundcubemail/releases/tag/1.7.5
roundcube.netroundcube.net/news/2026/10/19/security-updates-1.6.20-and-1.7.5

Frequently asked

questions

Exploitability depends on whether an attacker can influence stored Roundcube session data and cause the affected deserialization path to process it. It is not necessarily reachable by an unauthenticated remote user in every deployment.

The key prerequisite is the ability to modify, inject, or otherwise control data persisted in a relevant session. The exact access path depends on the session storage configuration and surrounding application controls.

Reject ambiguous session keys and avoid reconstructing attacker-influenced data into PHP objects. Prefer narrowly defined, schema-validated session formats that cannot instantiate arbitrary classes.

Treat session contents as untrusted input, use safe serialization boundaries, validate structure before parsing, and apply least-privilege controls to the webmail process and session store.

Exploitability depends on whether an attacker can influence stored Roundcube session data and cause the affected deserialization path to process it. It is not necessarily reachable by an unauthenticated remote user in every deployment.

The key prerequisite is the ability to modify, inject, or otherwise control data persisted in a relevant session. The exact access path depends on the session storage configuration and surrounding application controls.

Reject ambiguous session keys and avoid reconstructing attacker-influenced data into PHP objects. Prefer narrowly defined, schema-validated session formats that cannot instantiate arbitrary classes.

Treat session contents as untrusted input, use safe serialization boundaries, validate structure before parsing, and apply least-privilege controls to the webmail process and session store.

Find out what's already
exploitable in your codebase.