A serialization defect is a flaw in how data is converted into a stored or transmitted format and then reconstructed. In software and identity systems, it can corrupt objects, break message integrity, or enable code execution and deserialisation attacks when untrusted data is accepted.
What a serialization defect means
A serialization defect is not just a format bug, it is a trust-boundary failure. Data that leaves one structure and returns as another can lose integrity, gain unintended fields, or be interpreted in a way the original author never intended.
That matters because serialised objects often carry security-relevant state, such as permissions, identifiers, session context, or execution hints. When reconstruction is unsafe, the application may accept tampered input as if it were trusted internal data.
Why serialization defects are dangerous
The core danger is that the deserialiser may be asked to rebuild objects from untrusted content. If the parser accepts attacker-controlled type metadata, unexpected constructors, or gadget chains, the defect can move from data corruption into code execution or logic abuse.
Even where execution is not possible, a defect can still break message integrity, desynchronise distributed systems, or alter decisions made by downstream services. In identity and access workflows, that can mean forged claims, modified authorisation context, or corrupted tokens and session state.
Where these defects usually appear
Serialization defects show up in APIs, message queues, caches, session stores, RPC layers, and any component that persists structured objects and later reconstructs them. The risk rises when the format is opaque to operators, versioning is loose, or multiple services interpret the same payload differently.
They are especially problematic in systems that assume “internal” traffic is safe. A payload may arrive through a partner integration, a compromised service, or a seemingly harmless file import, then be treated as trusted because it looks like an expected object rather than arbitrary input.
For API-heavy systems, see OWASP API Security Top 10 for adjacent controls around authentication and authorisation failures that often compound deserialisation flaws.
How organisations reduce exposure and verify safety
Defence starts with knowing where serialisation happens, which data formats are accepted, and which components can submit them. Teams should inventory object stores, session handlers, queue consumers, and integration points, then verify whether untrusted input can reach any reconstruction path.
Safer designs prefer simple, schema-driven data exchange over native object deserialisation, with strict allowlists for expected fields and types. Where deserialisation cannot be removed, treat the boundary as hostile and constrain what the runtime may instantiate, call, or restore.
Practical verification also means checking vendor advisories, dependency usage, and exposed interfaces for known deserialisation weaknesses. General hardening guidance from NIST SP 800-53 Rev 5 Security and Privacy Controls is useful here, especially where organisations need controls around input validation, system integrity, and auditability.
Risk and Threat Considerations
Serialization defects are high impact because they sit at the point where external input becomes internal state. If an attacker can shape the payload, the defect may be used to corrupt business logic, bypass trust assumptions, or trigger arbitrary code execution through unsafe object reconstruction.
Failure mechanism: The application accepts untrusted serialised data, reconstructs it without strict validation, and instantiates objects or fields that alter control flow, integrity, or privilege decisions.
Impact: Depending on the implementation, the result can include message tampering, account or session compromise, privilege abuse, persistence, lateral movement, or full application compromise.
For a broader operational view of detection, response, and recovery around compromise scenarios, NIST Cybersecurity Framework 2.0 provides a useful organising model for the surrounding controls.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP API Security Top 10 addresses the attack and risk surface, while OWASP ASVS, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP ASVS | V15 — Secure Coding and Architecture | Serialization defects are an unsafe code-path and architecture issue. |
| Recommendation — Remove unsafe object deserialisation paths and enforce strict data contracts. | ||
| NIST SP 800-53 Rev 5 | SI-10 — Information Input Validation | Unsafe deserialisation accepts attacker-controlled input into object reconstruction. |
| SI-7 — Software, Firmware, and Information Integrity | Serialization defects can corrupt trusted state and enable code execution. | |
| Recommendation — Validate and constrain all serialised input before reconstruction. Verify integrity of reconstructed data and block unauthorised state changes. | ||
| OWASP API Security Top 10 | API8 — Security Misconfiguration | Unsafe deserialisation often stems from exposed or overly permissive API handling. |
| Recommendation — Harden API parsing paths and disable unsafe deserialisation features. | ||
| CIS Controls v8 | CIS-16 — Application Software Security | Serialization defects are application-layer weaknesses that require secure design and review. |
| Recommendation — Review application code for unsafe serializers and replace them with safer formats. | ||
Practitioner Guidance
What to watch for: Any design that serialises rich objects across trust boundaries deserves review, especially when it relies on native language object streams, hidden metadata, or automatic class loading. The safer assumption is that every deserialised payload is attacker-controlled until proven otherwise.
Governance implication: Teams should treat serialisation formats as part of the application security surface, with explicit ownership for libraries, schemas, and safe reconstruction rules. Where risk is material, reviewers should prefer narrow data contracts, versioned schemas, and controlled replacement of unsafe serializers rather than hoping surrounding controls will absorb the flaw.
If the defect affects secrets, sessions, or long-lived tokens, incident review should include invalidation and rotation decisions tied to the specific compromise path.
Related resources from NHI Mgmt Group
- How can security teams tell whether serialization risk is actually controlled?
- Why does prompt injection become more serious when serialization is involved?
- What breaks when attacker-shaped LLM output reaches serialization paths in AI frameworks?
- How should organisations respond when a core AI framework serialization flaw is disclosed?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 28, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org