insecure-deserialization

insecure-deserialization is a skill for Claude Code from latestaiagents/agent-skills. It costs 72 tokens per session (1,951 once invoked), scanned B, original, MIT.

A security guide for safely turning serialized data into program objects. Serialization is the process of storing or transmitting structured data; unsafe deserialization can let untrusted input run code or change application behavior.

In plain words
What is it for?
Use it when handling pickle, marshal, YAML, Java objects, PHP serialized data, type-rich JSON, or other untrusted serialized input.
Why use it?
It helps remove risks from accepting hostile serialized data in APIs, cookies, queues, or imported files.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the owasp-guardian plugin — 6 skills shipped together , and of security, latestaiagents

Good fit Use it when handling pickle, marshal, YAML, Java objects, PHP serialized data, type-rich JSON, or other untrusted serialized input.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/latestaiagents/agent-skills/insecure-deserialization
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add latestaiagents/agent-skills --skill insecure-deserialization
Clone the repo
git clone --depth 1 https://github.com/latestaiagents/agent-skills

Made for: Claude Code.

Or install owasp-guardian, the plugin that ships this one along with the rest of its 6 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for insecure-deserialization

README.md
[![agentmods](https://agentmods.dev/badge/skills/latestaiagents/agent-skills/insecure-deserialization/github.svg)](https://agentmods.dev/skills/latestaiagents/agent-skills/insecure-deserialization)
Your own site
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/insecure-deserialization"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/insecure-deserialization/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for insecure-deserialization

Your own site · 80×15
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/insecure-deserialization"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/insecure-deserialization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,951 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00072 $0.01951
Opus 5 $0.00036 $0.00975
Sonnet 5 $0.00014 $0.00390
Haiku 4.5 $0.00007 $0.00195

Measured 5d ago against content hash 92caa706819e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

insecure-deserialization scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Encoded or obfuscated payloadmediumSupply chain

base64 or hex that is decoded and executed hides what actually runs from anyone reading the file.

data = marshal.loads(user_input)

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/security/owasp-guardian/insecure-deserialization/SKILL.md · 315 lines

How it starts

The opening of the file, as written. The whole thing — 315 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Insecure Deserialization (OWASP A08)

Prevent remote code execution and object injection through safe deserialization practices.

When to Use

  • Parsing serialized objects from untrusted sources
  • Handling session data or cookies
  • Processing API payloads with type information
  • Working with message queues
  • Importing/exporting data

Risk Levels by Language

Language Serialization Risk Impact
Java ObjectInputStream CRITICAL RCE
Python pickle/marshal CRITICAL RCE
PHP unserialize() CRITICAL RCE
Ruby Marshal.load CRITICAL RCE
Node.js node-serialize HIGH RCE
.NET BinaryFormatter CRITICAL RCE
JavaScript JSON.parse LOW Prototype pollution

Vulnerable Patterns

Python

# VULNERABLE - pickle with untrusted data
import pickle
data = pickle.loads(user_input)  # RCE possible!

# VULNERABLE - yaml.load without SafeLoader
import yaml
data = yaml.load(user_input)  # RCE possible!

# VULNERABLE - marshal
import marshal
data = marshal.loads(user_input)

Java

// VULNERABLE - ObjectInputStream with untrusted data
ObjectInputStream ois = new ObjectInputStream(inputStream);
Object obj = ois.readObject();  // RCE possible!

// VULNERABLE - XMLDecoder
XMLDecoder decoder = new XMLDecoder(inputStream);
Object obj = decoder.readObject();

PHP

// VULNERABLE - unserialize with user input
$data = unserialize($_POST['data']);  // RCE possible!

// VULNERABLE - unserialize from cookie
$session = unserialize($_COOKIE['session']);

Node.js

// VULNERABLE - node-serialize
const serialize = require('node-serialize');
const obj = serialize.unserialize(userInput);  // RCE possible!

// VULNERABLE - js-yaml without safe loading
const yaml = require('js-yaml');
const data = yaml.load(userInput);  // Code execution possible!

// VULNERABLE - prototype pollution via JSON
const obj = JSON.parse('{"__proto__": {"admin": true}}');

Read the full file on GitHub · 315 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 315 lines · 72 tokens per session scan B 92caa706819e

Subscribe to this mod's changes

insecure-deserialization is a skill published in the GitHub repository latestaiagents/agent-skills (5 stars, last pushed 4mo ago), licensed MIT. It adds 72 tokens to every session and 1,951 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (encoded or obfuscated payload). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

fw-ai-actions-app

Expert-level skill for AI Actions and integrations on Freshworks Platform 3.0. Use when (1) Creating actions.json and SMI functions (flat request, nested response), (2) Request templates and third-party API integration, (3) Pre-build validation (pricing, paywalls, account prerequisites), (4) Failure-case validation…

freshworks-developers/fw-dev-tools · 123 tokens

multi-app-orchestration

Orchestrate workflows across multiple applications and APIs — inter-app coordination, data handoff, and multi-system task completion.

a5c-ai/babysitter · 30 tokens

api-documenter

Auto-generate API documentation from code and comments. Use when API endpoints change, or user mentions API docs. Creates OpenAPI/Swagger specs from code. Triggers on API file changes, documentation requests, endpoint additions.

alirezarezvani/claude-code-tresor · 48 tokens

sinch-porting-api

Port phone numbers from other carriers into Sinch with the Porting API. Automates port-in order creation, portability checks, order tracking, on-demand activation, and webhook notifications. Use when porting numbers, checking portability, creating port-in orders, tracking port status, activating ported numbers…

sinch/skills · 76 tokens

sinch-voice-api

Build voice apps with Sinch Voice REST API. Use for phone calls, text-to-speech (TTS), IVR menus, DTMF input, conference calling, call recording, call forwarding, answering machine detection (AMD), SIP routing, WebSocket audio streaming, and SVAML call control.

sinch/skills · 67 tokens

sinch-whatsapp

Sends WhatsApp Business messages via the WhatsApp channel of the Sinch Conversation API — text, media, interactive, and Meta-approved template messages. Covers the 24-hour customer service window, template approval, opt-in requirements, and media specifications. Use when sending a WhatsApp message or WhatsApp…

sinch/skills · 91 tokens