Join our Newsletter — 33% off our NHI Course
Home FAQ Threats, Abuse & Incident Response How do security teams know whether unsafe deserialisation…
Threats, Abuse & Incident Response

How do security teams know whether unsafe deserialisation is still present in production?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated August 18, 2026 Domain: Threats, Abuse & Incident Response

Check the exact code path, not the application banner. Confirm whether the module still calls native unserialize(), whether public request values reach the cache, and whether any writable PHP files appear in the module directory. If those conditions exist, the control gap is active even if the storefront looks stable.

Why This Matters for Security Teams

unsafe deserialisation is not a cosmetic flaw. If production still accepts attacker-controlled serialized input, the issue can translate into object injection, command execution, file writes, or privilege escalation even when the storefront, API, or admin console appears normal. Security teams often miss it because they validate the version or banner instead of tracing whether live request data still reaches the sink.

This is why NHI Management Group treats runtime proof as the deciding factor. The broader identity lesson is consistent with the Ultimate Guide to NHIs — The NHI Market: hidden, long-lived control paths are where compromise persists. The same operational mindset applies here, and it aligns with NIST SP 800-63 Digital Identity Guidelines in the sense that identity and trust must be validated at the point of use, not assumed from labels or packaging.

In practice, many security teams encounter unsafe deserialisation only after a proof-of-concept lands in logs, rather than through intentional production validation.

How It Works in Practice

The fastest way to determine whether the flaw is still active is to test the exact execution path that production uses. That means confirming three things together: whether the code still invokes native unserialize(), whether untrusted request parameters can reach that call, and whether the module directory contains writable PHP files or other conditions that enable gadget chaining or code planting. A missing banner, a patched front end, or a WAF signature does not change the back-end sink.

Security teams usually combine source review, runtime tracing, and a safe canary test. On the code side, grep for native deserialisation calls and any wrapper logic that forwards cache values, cookies, headers, or POST data into the sink. On the runtime side, instrument the request flow or use application logs to verify whether the path is still reachable in production traffic. On the filesystem side, check whether module directories are writable by the web process, because a writable module path can turn a deserialisation issue into durable execution.

  • Confirm the sink: native unserialize(), phar handling, or equivalent object reconstruction.
  • Trace taint: prove whether public input can influence the serialized payload.
  • Check persistence: inspect writable directories, cache backends, and upload paths.
  • Validate behavior: use a low-risk test object or benign marker to confirm live reachability.

For broader control mapping, The State of Non-Human Identity Security shows that monitoring and rotation gaps are common, which matters when the vulnerable component stores secrets or session material in places an attacker can later reuse. From a standards perspective, NIST SP 800-53 Rev 5 Security and Privacy Controls is the right lens for validating secure configuration, system integrity, and continuous monitoring around the affected component.

These controls tend to break down when legacy PHP modules depend on cache-backed object storage and shared write permissions, because the vulnerable sink can remain reachable even after an application-level patch elsewhere.

Common Variations and Edge Cases

Tighter verification often increases operational overhead, requiring organisations to balance confidence against the risk of disturbing a live system. That tradeoff is real, especially in PHP estates where serialization is embedded in session handling, caches, plugins, or older CMS modules.

There is no universal standard for this yet, but current guidance suggests treating any reachable native deserialisation as a live risk until proven otherwise. A codebase may have removed obvious request parameters and still remain exposed through cached blobs, queue messages, or internal service calls. Likewise, a module can be “disabled” in the UI while its files still sit on disk and remain writable to the web server. In those cases, the issue is environmental, not just code-level.

This is where governance and identity discipline matter. The same hidden-path problem appears in NHI estates when credentials, secrets, or service accounts remain valid after teams assume they are gone. NHI Management Group research highlights the scale of the problem in Ultimate Guide to NHIs and in The State of Non-Human Identity Security, where visibility and rotation gaps remain common. For teams that need a governance anchor, NIST SP 800-63 Digital Identity Guidelines and NIST SP 800-53 Rev 5 Security and Privacy Controls support the principle that trust and access must be continuously verified, not presumed.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10, OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-04Writable module paths and live sinks mirror insecure secret and identity handling.
OWASP Agentic AI Top 10LLM-02Runtime trust validation parallels agent tool-use and unsafe execution paths.
CSA MAESTROM2MAESTRO emphasizes secure orchestration and runtime control validation.
NIST AI RMFGOVERNAI RMF governance supports continuous verification of risky runtime behavior.
NIST CSF 2.0PR.PT-3Protective technology and configuration hardening reduce exploitability of deserialisation sinks.

Inventory exposed secrets and writable paths, then remove or restrict any production object-reconstruction sink.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on August 18, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org