Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Deserialization Security

ASecurity

Analyze unsafe deserialization and object-decode sinks — use when reviewing pickle, YAML load, Java ObjectInputStream, PHP unserialize, or untrusted serialized blobs (CWE-502 / A08:2021).

15 stars
0 votes
0 copies
0 views
Added 9/22/2026
securityjavascriptrustgojavaphpnodeapisecurity

Works with

api

Security Analysis

A100/100

Scanned 9/22/2026

Install to Claude Code

$npx -y skills add awarexone/AXguard --skill deserialization-security --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Deserialization Security?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Deserialization Security
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/awarexone-deserialization-security/badge)](https://www.skillsdirectory.com/skills/awarexone-deserialization-security)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: deserialization-security
description: Analyze unsafe deserialization and object-decode sinks — use when reviewing pickle, YAML load, Java ObjectInputStream, PHP unserialize, or untrusted serialized blobs (CWE-502 / A08:2021).
version: "1.0.0"
author: AwareXone
license: MIT
domain: application-security
subcategory: injection
tags: [deserialization, pickle, unserialize, cwe-502]
frameworks:
  cwe: [CWE-502]
  owasp_top10: [A08:2021]
  owasp_api_top10: []
  owasp_llm_top10: []
  owasp_wstg: []
  owasp_asvs: []
  mitre_attack: []
  mitre_atlas: []
  nist_csf: []
  nist_ai_rmf: []
related_skills: [command-injection, ssti-analysis, api-security, security-triage, security-remediation]
related_commands: [/axguard-inject, /axguard-audit, /axguard-scan]
related_rules: [injection.]
references:
  - https://owasp.org/Top10/A08_2021-Software_and_Data_Integrity_Failures/
  - https://cwe.mitre.org/data/definitions/502.html
last_reviewed: "2026-09-15"
---

# Deserialization Security

## Purpose

Encode practitioner analysis of **insecure deserialization**: untrusted data is decoded into objects/code paths that invoke unexpected constructors, magic methods, or gadgets, often causing RCE or auth bypass.

## When to Use / When Not to Use

**Use when:**

- `pickle.loads`, `yaml.load` (unsafe), `ObjectInputStream`, `unserialize(`, `BinaryFormatter`, `Marshal.load`, JavaScript `node-serialize`-class patterns, Redis/cache storing pickled objects, signed-but-not-encrypted cookies of serialized state.
- After AXguard hits `injection.*pickle*`, `*unserialize*`, `*objectinput*`.

**Do not use when:**

- Data is pure JSON/structured text parsed into primitive DTOs with schema validation and no polymorphic type attacker control.
- Serialization is only outbound (encoding) with no decode of untrusted input.

## Security Concepts

Many serializers can reconstruct arbitrary types. Integrity of the blob (HMAC) helps only if the key is secret and verification happens **before** deserialize. Prefer data-only formats (JSON) + explicit schema.

## Threat Model

Attacker goals:

1. Remote code execution via gadget chains.
2. Forge session/auth objects.
3. DoS via deeply nested / expensive object graphs.

## Analysis Workflow

1. Inventory decode sinks and libraries/versions.
2. Trace whether the blob is attacker-reachable (HTTP body, cookie, queue, file upload, cache key value).
3. Check for cryptographic integrity (HMAC/signature) and whether verification precedes deserialize.
4. Determine allowed types / allowlists (`yaml.safe_load`, Java allowlists, PHP allowed_classes).
5. Prefer replacing the format over “hardening” unsafe loaders when possible.
6. Assess impact based on process privileges and available gadgets in classpath/deps.

## Evidence Requirements

- Decode sink location
- Untrusted source of serialized bytes
- Missing integrity check or unsafe loader API
- Impact hypothesis (RCE / auth forge / DoS)

## False Positive Controls

- `yaml.safe_load` / JSON-only parsers
- Deserialize only of trusted operator-controlled backups offline
- Integrity-protected blobs with server-side keys and no attacker key access (residual risk if types still dangerous — note)

## Remediation

1. Prefer JSON (or similar) with schema validation.
2. Never `pickle`/`unserialize` untrusted data; use safe loaders and type allowlists if unavoidable.
3. Authenticate then decrypt/verify before decode; rotate keys.
4. Isolate deserializers in hardened workers; keep deps patched.
5. Remove unused gadget-heavy libraries from classpath.

## Verification

```text
Find unsafe loaders → Replace with safe format/API → Re-run axguard → Confirm no untrusted deserialize path
```

## Related Skills

- `command-injection`, `ssti-analysis` — alternate RCE
- `api-security` — untrusted message bodies
- `security-triage`, `security-remediation`

## Framework Mapping

- CWE-502
- OWASP Top 10 2021 A08:2021 Software and Data Integrity Failures

## References

- https://owasp.org/Top10/A08_2021-Software_and_Data_Integrity_Failures/
- https://cwe.mitre.org/data/definitions/502.html

## Research Provenance

Primary sources:

- OWASP Top 10:2021 A08; CWE-502 (accessed 2026-09-15)

Secondary / internal:

- AXGuard `rules/injection.json`, `rules/advanced.json` (unserialize/ObjectInput patterns)
- AwareXone Agentic-Bug-Hunter deserialization methodology (concepts only; not copied)

Datasets:

- UVID HF dataset — category linkage concepts only (MIT license metadata review 2026-09-15)

Attribution

awarexoneawarexone
View sourceMore from awarexone →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Springboot Security

Java Spring Boot 服务中关于身份验证/授权、验证、CSRF、密钥、标头、速率限制和依赖安全的 Spring Security 最佳实践。

2456590 votes

Security Review

Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.

2456590 votes

Paperclip Task Bridge

Create, comment on, update, and list Paperclip tasks from Hermes using scoped Paperclip API credentials.

805540 votes

Summarize Status

Write a short, colloquial summary for a Paperclip summary slot: open with the 1–3 specific, concrete actions the reader needs to take right now to unblock the work, then a brief plain-language status, streaming progress as it works.

805540 votes

Paperclip Evals

Choose, inspect, validate, and report Paperclip Runner or Product E2E evaluations while preserving evidence, provenance, cost, and failure classification.

805540 votes
View all in security →