Skip to content

CVE-2026-122662: WordPress Barn2 Document Library Pro PHP Object Injection / Deserialization

Density:
C-Level Executive Briefing CVE-2026-122662 CRITICAL SCORE 91/100

The commercial WordPress plugin 'Document Library Pro' by Barn2 Plugins (versions prior to 4.2.2) is affected by a critical unauthenticated PHP Object Injection vulnerability (CVE-2026-122662, CVSS 9.8). Exposed plugin endpoints pass user-supplied input directly to PHP's unserialize(), enabling remote attackers with zero credentials to instantiate arbitrary PHP objects and trigger Property-Oriented Programming (POP) gadget chains present in WordPress core or co-installed plugins. Successful exploitation leads to arbitrary file deletion, SQL injection, or full Remote Code Execution (RCE). Update immediately to version 4.2.2 or later.

HERMES

HERMES THREAT SCORE & ENTERPRISE RISK EVALUATION

Target: WordPress Barn2 Document Library Pro (< 4.2.2)
Confidence: 96%
91 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 19 / 20
Threat Activity 18 / 20
Weaponization 19 / 20
Exposure 19 / 20
Prevalence 18 / 20
Impact 19 / 20
Exploit Maturity 18 / 20
Attack Chain Potential 19 / 20
โš–๏ธ Divergence & Operational Rationale

Hermes assigns HTS 91 (CRITICAL) because unauthenticated PHP Object Injection in commercial WordPress plugins is rapidly automated by mass-exploitation botnets once disclosed, especially when paired with ubiquitous WordPress/WooCommerce POP gadgets.


CVE-2026-122662 (CVSS v3.1 9.8 Critical, Hermes Threat Score 91 / CRITICAL) is an unauthenticated PHP Object Injection vulnerability (CWE-502) in the Barn2 Plugins Document Library Pro plugin for WordPress, affecting all versions prior to 4.2.2.

Document Library Pro is widely deployed across corporate intranets, public document portals, and WooCommerce-enabled WordPress sites. Because the vulnerable deserialization path does not require authentication (PR:N), remote attackers can mass-scan and weaponize POP gadget chains from popular co-installed plugins (such as WooCommerce, Elementor, or Guzzle) to achieve arbitrary file writes, database compromise, or web shell deployment.


  • Vulnerable Component: document-library-pro serialized data parser in versions < 4.2.2.
  • Root Cause (CWE-502): The plugin invokes PHPโ€™s unserialize() directly on user-controlled HTTP input without specifying allowed_classes => false or using safe JSON serialization (json_decode()).
  • Weaponization via POP Chains: While Document Library Pro itself may not contain a direct RCE sink inside its own classes, WordPress environments typically load dozens of third-party libraries (e.g., GuzzleHttp, Monolog, WP_Theme, WC_Log_Handler_File). Instantiating crafted object graphs triggers magic methods (__wakeup(), __destruct(), __toString()) upon request completion, escalating to arbitrary file deletion (wp-config.php reset) or arbitrary PHP execution.

sequenceDiagram
autonumber
participant Attacker as Unauthenticated Attacker
participant WP as WordPress (Document Library Pro < 4.2.2)
participant PHP as PHP unserialize() Engine
participant Gadget as Co-Installed POP Gadget (__destruct/__wakeup)
Attacker->>WP: HTTP POST with crafted serialized payload (O:len:"Class":...)
WP->>PHP: unserialize(user_input) without allowed_classes=false
PHP->>Gadget: Instantiate attacker-controlled object graph
Gadget-->>Attacker: Magic method executes arbitrary file write / SQLi / RCE

  • Payload Pattern: HTTP POST bodies or query parameters containing serialized PHP object prefixes such as O: or a: followed by class names (regex: /(?:^|[&=])[^=]*=(?:O|C):[0-9]+:%22/i).
  • Targeted Endpoints: /wp-admin/admin-ajax.php or /wp-json/ routes associated with document-library-pro.

  1. Upgrade to Document Library Pro 4.2.2+: Update the plugin via WordPress Admin (Plugins -> Installed Plugins) or WP-CLI (wp plugin update document-library-pro) to version 4.2.2 or later, which replaces unsafe unserialize() calls with validated JSON decoding.
  2. Deploy WAF Deserialization Signatures: Enable ModSecurity / Cloudflare WAF rules blocking serialized PHP object payloads (O:<len>:"<Class>":) in inbound HTTP parameters.
  3. Audit Site Integrity: Verify WordPress core checksums (wp core verify-checksums), check for newly created administrator users, and inspect web server access logs for prior POST requests carrying serialized payloads.