Severity:

HIGH RISK

(8.1)

Unsafe Deserialization / PHP Object Injection

CVE-2026-7635

Deferred

Vulnerability type

Category:

Unsafe Deserialization / PHP Object Injection

CWE:

CWE-502

Impact:

Persistent Denial of Service (Admin Logs Page Unusable)

Severity:

HIGH RISK

(8.1)

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

A PHP object injection vulnerability in the coreActivity: Activity Logging for WordPress plugin allows untrusted data from the User-Agent header to be stored and later deserialized without validation.

Unauthenticated attackers can inject crafted serialized payloads that, when processed by the admin Logs page, trigger a fatal TypeError and create a persistent denial of service for log viewing and analysis.

Affected context

The vulnerability exists in WordPress sites using the coreActivity: Activity Logging for WordPress plugin up to and including version 3.0.

It specifically affects the logging pipeline where request metadata (including the User-Agent HTTP header) is stored in the logmeta table and later retrieved and passed through maybe_unserialize() inside query_metas().

The issue manifests when administrators access the plugin's Logs page in the WordPress dashboard, at which point maliciously crafted log metadata can be deserialized and processed, causing the fatal error and blocking further access to that page until the malicious entries are removed at the database or application level.

Exploit preconditions

  • Attack surface: Public-facing WordPress endpoints that are monitored by the coreActivity logging plugin (e.g., login, failed login, general site access).
  • Required access: No authentication is required; any remote user able to send HTTP requests to the site can supply a malicious User-Agent header.
  • Trigger point: The attack is triggered when an administrator visits the coreActivity Logs page and the plugin reads logmeta entries, calls maybe_unserialize() on each meta_value, and passes the resulting value into DeviceDetector::setUserAgent().
  • Why exploitation is possible:
  • The plugin accepts raw User-Agent header values and stores them without filtering out PHP serialization syntax.
  • query_metas() blindly calls maybe_unserialize() on all meta_value entries without tracking or validating that those values were serialized by the application.
  • The resulting unserialized data is used as if it were a valid string and handed to DeviceDetector::setUserAgent(), which cannot handle unexpected object types and throws a fatal TypeError, resulting in a persistent denial of service for the Logs page.

Why this happens

This vulnerability stems from unsafe deserialization of untrusted input, corresponding to CWE-502: Deserialization of Untrusted Data.

The plugin treats the User-Agent header as benign metadata, but fails to:

  • Constrain its format to a predictable string.
  • Strip or reject PHP serialization syntax before storage.

Later, during log retrieval, the code applies maybe_unserialize() to every meta_value regardless of its origin, thereby implicitly trusting that anything in the field is safe to unserialize.

This pattern—accepting arbitrary user-controlled data, storing it, and then unserializing it in a privileged context—creates an object injection channel.

In this particular case, deserializing attacker-controlled data causes a type mismatch in DeviceDetector::setUserAgent(), yielding a fatal TypeError and blocking admin access to the Logs page, rather than full code execution; however, the underlying pattern is still an unsafe deserialization flaw.

Potential impact

  • The Logs page in the WordPress admin dashboard can become permanently inaccessible until the malicious entries are manually removed.
  • Administrators may be unable to review or audit activity logs, hampering incident response and monitoring.
  • Repeated exploitation can continuously reintroduce the denial of service condition on the logging interface.
  • Depending on broader ecosystem and future code changes, similar unsafe deserialization paths could be leveraged for more severe outcomes, such as privilege escalation or code execution.

General mitigation guidance

Effective mitigation focuses on eliminating unsafe deserialization paths and tightening input handling around log metadata:

  • Treat HTTP headers, including User-Agent, as untrusted strings and avoid storing them in a format that could be interpreted as serialized PHP data.
  • Restrict maybe_unserialize() usage to clearly defined fields that are known to be application-generated serialized data, rather than applying it generically to all metadata.
  • Introduce explicit type and format validation for log fields before further processing (e.g., ensure the User-Agent value is a string within bounded length and contains only expected characters).
  • When storing complex metadata, favor structured formats that do not support executable constructs, such as JSON, and ensure parsing routines do not invoke any dynamic evaluation.
  • Apply defensive coding around third-party library calls (such as DeviceDetector::setUserAgent()) by validating and normalizing input types and values before invocation.
  • Run admin-facing log processing logic with robust error handling to prevent a single malformed record from taking down an entire admin page.

How teams detect issues like this

Detection strategies can combine static analysis, code review, and runtime monitoring:

  • Static analysis and linters:
  • Flag use of unserialize() and maybe_unserialize() on data that can originate from request headers, query parameters, cookies, or other user-controlled sources.
  • Detect generic deserialization of fields without prior origin tracking or serialization markers.
  • Code review signals:
  • Logging components that ingest raw HTTP headers or request metadata and later deserialize or dynamically interpret stored values.
  • Database access patterns that call maybe_unserialize() on broadly scoped columns such as meta_value without checking if the data is actually serialized by the application.
  • Lack of type checks before calling libraries like DeviceDetector::setUserAgent() or similar parsing utilities.
  • Policy and tooling:
  • Apply secure coding guidelines that prohibit deserialization of untrusted data and require explicit justification for any use of serialization APIs.
  • Integrate automated security review tools or SAST solutions into CI pipelines to highlight unsafe deserialization patterns early.
  • Runtime and operational monitoring:
  • Monitor PHP error logs for recurring fatal TypeErrors originating from the logging plugin or admin log views.
  • Set alerts on spikes in errors tied to deserialization functions, which can indicate active exploitation attempts.

Sources

SourceLink
github.comgithub.com/dev4press/coreactivity/pull/3/changes/1f09331d66de7cf4bba9b6e396b0d4e7597fcde2
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/coreactivity/tags/3.0/core/log/Core.php#L252
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/coreactivity/tags/3.0/core/log/Device.php#L35
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/coreactivity/tags/3.0/core/table/Logs.php#L161
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/coreactivity/tags/3.0/vendor/dev4press/library/dev4press/core/plugins/DBLite.php#L268
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/coreactivity/tags/3.0/vendor/dev4press/library/dev4press/wordpress/admin/Table.php#L290
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/coreactivity/trunk/core/log/Core.php#L252
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/coreactivity/trunk/core/log/Device.php#L35
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/coreactivity/trunk/core/table/Logs.php#L161
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/coreactivity/trunk/vendor/dev4press/library/dev4press/core/plugins/DBLite.php#L268
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/coreactivity/trunk/vendor/dev4press/library/dev4press/wordpress/admin/Table.php#L290
wordfence.comwordfence.com/threat-intel/vulnerabilities/id/59f30135-6dd9-4367-90a9-a10ad491357d?source=cve

Frequently asked

questions

Yes. Any remote attacker who can send HTTP requests to the WordPress site can exploit this issue by crafting a malicious User-Agent header, without needing an account or prior access.

No authentication is required to inject the payload into the logs. However, the visible impact (fatal error and denial of service) is triggered when an administrator visits the Logs page in the dashboard, causing the vulnerable deserialization and processing logic to execute.

The safest approach is to avoid deserializing untrusted data entirely. Only apply unserialize()/maybe_unserialize() to data that the application itself serialized, track which fields are serialized, and treat all user-controlled data (including headers) as plain, validated strings. Where possible, replace PHP serialization with safer, strictly typed data formats such as JSON, combined with strict schema validation.

Establish coding standards that forbid unsafe deserialization of user input, enforce clear separation between trusted and untrusted data, and require validation and type checking before passing values into libraries or framework components. Incorporate static analysis and security review into the development lifecycle to automatically flag risky patterns like generic maybe_unserialize() on log or metadata fields, and design logging systems so that malformed entries cannot break administrative interfaces.

Find out what's already
exploitable in your codebase.