Join our Newsletter — 33% off our NHI Course
Home› Glossary› Foundations & NHI Taxonomy› Serialization Format
Foundations & NHI Taxonomy

Serialization Format

← Back to Glossary
By NHI Mgmt Group Updated October 10, 2026 Domain: Foundations & NHI Taxonomy

A serialization format is the way software stores or transmits structured objects for later reconstruction. In security analysis, the choice matters because some formats are data-only, while others, such as pickle, can embed execution behavior if they are fed untrusted input.

What Serialization Formats Are For

Serialization formats define how structured data is encoded so software can save it, send it, and later reconstruct the original object. That makes the format a contract between systems, not just a storage choice.

In practice, the format determines what state survives a round trip, how interoperable the data is across languages, and whether the representation stays as data or starts to carry behavior.

Common Types of Serialization Formats

Most serialization formats fall into a few broad families. Text-oriented formats such as JSON and XML are designed for readability and portability, while binary formats such as Protobuf, Avro, or MessagePack prioritise compactness and speed.

Some ecosystems also use native object serializers that preserve language-specific structures more directly. Those can be convenient inside one runtime, but they often trade away transparency and cross-platform compatibility.

The practical distinction is whether the format is meant to represent data or a richer object graph with type metadata, references, or reconstruction instructions. The more expressive the format, the more caution is needed when the source of the data is not fully trusted.

Why Serialization Choice Matters for Security

Serialization is not security-neutral. A format that only carries data limits the kinds of mistakes an application can make, while a format that can preserve object types, callbacks, or execution hints can turn deserialization into an execution boundary.

That is why the difference between a safe interchange format and a native object serializer matters so much. A parser that assumes it is receiving benign data may reconstruct something with side effects, unexpected type coercion, or gadget-driven behavior.

Good security design treats the serializer and deserializer as part of the trust boundary. If the input can come from users, partners, queues, caches, or files outside your control, the format selection affects not only compatibility but also attack surface.

Where Serialization Becomes Dangerous

Risks rise when developers use general-purpose object serialization for data that should have been simple structured input. Formats that support executable reconstruction logic, polymorphic type hints, or opaque binary objects can become dangerous if an attacker can influence the payload.

Even without explicit code execution, unsafe deserialization can still cause denial of service, logic corruption, privilege abuse, or the loading of attacker-controlled classes and objects. The key issue is not the file type itself, but what the runtime is allowed to do while rebuilding it.

Safer designs usually prefer explicit schemas, strict type validation, and formats that separate data from behavior. That is the main security dividing line in serialization work: can the receiver interpret the payload without granting it extra authority?

Risk and Threat Considerations

Serialization formats create a trust boundary, and that boundary is often crossed with data from clients, queues, caches, and third-party integrations. When the chosen format can influence object construction or type resolution, the result can be remote code execution, logic abuse, or denial of service.

Failure mechanism: An attacker supplies a crafted payload that exploits unsafe deserialization, type confusion, or gadget chains, causing the application to instantiate unexpected objects or execute unintended behavior.

Impact: The compromise can lead to code execution, data exposure, service disruption, or deeper application compromise, especially when deserialization occurs before validation or authorization.

Standards & Framework Alignment

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

NIST SP 800-53 Rev 5, OWASP ASVS and CIS Controls v8 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5SI-10 — Information Input ValidationSerialization inputs must be validated before object reconstruction.
SA-11 — Developer Testing and EvaluationSecure deserialization behavior needs verification during development and testing.
Recommendation — Validate serialized input before deserializing it. Test deserialization paths for unsafe object reconstruction.
OWASP ASVSV15 — Secure Coding and ArchitectureSerialization format choice affects secure architecture and unsafe deserialization risk.
Recommendation — Prefer data-only serialization patterns in secure design.
CIS Controls v8CIS-16 — Application Software SecurityApplication security safeguards should address unsafe serialization handling.
Recommendation — Review application code for unsafe deserialization patterns.
ISO/IEC 27001:2022A.8.28 — Secure codingSecure coding controls apply to dangerous serialization and deserialization logic.
Recommendation — Apply secure coding practices to serialization code.

Practitioner Guidance

Why practitioners should care: Treat serialization format selection as a control decision, not a developer convenience. The safest default is a data-only format with a narrow schema and predictable decoding rules.

Common misunderstanding: Many teams assume that if data is encoded or signed, it is automatically safe to deserialize. Encoding does not remove behavioral risk, and integrity alone does not make an expressive object format harmless.

Practitioner takeaway: Use the least expressive format that still meets the interoperability requirement, and reserve native object serialization for tightly controlled internal boundaries.

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.

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