Summary
b2evolution CMS contains an incomplete validation fix for an unsafe PHP object deserialization issue. An unauthenticated attacker may submit a crafted serialized payload that bypasses array-key checks and reaches unserialize(), potentially enabling code execution when suitable gadget chains are available.
Affected context
The issue occurs in b2evolution CMS deployments using affected versions of the request-processing path at htsrv/call_plugin.php. Risk is present when attacker-controlled POST data is passed through param_check_serialized_array() and then reaches PHP object deserialization without fully rejecting negative integer array keys. Successful code execution also depends on usable application or library gadget chains being available.
Exploit preconditions
- Attack surface: Publicly reachable HTTP POST handling through
htsrv/call_plugin.php - Required access: No authentication may be required to submit the crafted request
- Trigger point: Processing of serialized array data before it is passed to
unserialize() - Why exploitation is possible: Validation does not reject all attacker-controlled serialized structures, allowing object instantiation with attacker-chosen properties
- Additional condition: A compatible PHP object property-oriented programming gadget chain must be present for code execution
Why this happens
The underlying bug is incomplete validation of serialized input. The defensive check attempts to distinguish permitted serialized arrays from serialized objects, but fails to account for payloads containing negative integer array keys. This allows a crafted value to pass validation and reach PHP's unserialize() function, which can instantiate objects and populate their properties from attacker-controlled data. The behavior maps to CWE-502: Deserialization of Untrusted Data.
Potential impact
- An attacker may instantiate unexpected PHP objects within the application process
- Application behavior or stored data could be altered through attacker-controlled object properties
- Code execution could occur if suitable gadget chains are available
- Web server or application credentials could be exposed
- The CMS environment could be used for further compromise or lateral movement
General mitigation guidance
Mitigation generally focuses on eliminating unsafe deserialization of attacker-controlled data and making validation complete rather than relying on narrowly defined serialized-array checks.
Common defensive patterns include:
- Replacing PHP object deserialization with structured formats that do not instantiate classes
- Using strict allowlisted schemas and data types for request parameters
- Rejecting unexpected keys, nested structures, and serialized object markers before processing
- Reducing trust in all unauthenticated request data, including values that appear array-like
- Restricting available classes and application privileges where deserialization cannot yet be removed
- Applying defense-in-depth controls around web-process filesystem, database, and operating-system access
How teams detect issues like this
Detection approaches commonly include:
- Static analysis rules identifying
unserialize()calls that receive request-derived or otherwise untrusted data - Code review checks for blacklist-based serialized-input validation and incomplete handling of negative or unusual array keys
- Instrumentation or web-application firewall policies that flag serialized PHP object markers and anomalous serialized structures in POST bodies
- Runtime monitoring for unexpected class instantiation, unusual child processes, or web-process access to sensitive resources
- CI policy checks requiring explicit data-flow review for every deserialization path
Automated security review tools may help identify direct and indirect flows from HTTP input to deserialization functions.

