CkSKILLS: Skill for Claude Code

.agents/skills/deserialization-xxe/SKILL.md

deserialization-xxe is a skill for Claude Code, Codex from zhaji2333/CkSKILLS. It costs 78 tokens per session (1,047 once invoked), scanned C, original, MIT.

A security guide for finding unsafe deserialization, XML external entity (XXE), and prototype-pollution flaws in applications and data parsers.

In plain words
What is it for?
Use it when reviewing XML, SOAP, Office, YAML, JSON-merging, or serialized-data inputs in Java, PHP, Python, .NET, or Node.js applications.
Why use it?
These flaws can let crafted input read files, alter program objects, or execute unintended code when untrusted data is processed unsafely.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is zhaji2333/CkSKILLS's own configuration. It tells Claude Code and Codex how to work on CkSKILLS itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything CkSKILLS configures →

Reuse

Borrowing it

Nothing to install: this file belongs to zhaji2333/CkSKILLS. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/zhaji2333/CkSKILLS/main/.agents/skills/deserialization-xxe/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/zhaji2333/CkSKILLS

Made for: Claude Code, Codex.

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 deserialization-xxe

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhaji2333/ckskills/deserialization-xxe/github.svg)](https://agentmods.dev/skills/zhaji2333/ckskills/deserialization-xxe)
Your own site
<a href="https://agentmods.dev/skills/zhaji2333/ckskills/deserialization-xxe"><img src="https://agentmods.dev/badge/skills/zhaji2333/ckskills/deserialization-xxe/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 deserialization-xxe

Your own site · 80×15
<a href="https://agentmods.dev/skills/zhaji2333/ckskills/deserialization-xxe"><img src="https://agentmods.dev/badge/skills/zhaji2333/ckskills/deserialization-xxe.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,047 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 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.00078 $0.01047
Opus 5 $0.00039 $0.00524
Sonnet 5 $0.00016 $0.00209
Haiku 4.5 $0.00008 $0.00105

Measured 10d ago against content hash 01492f968dfa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade C, and why

deserialization-xxe scanned grade C 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 10d 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.

Cloud metadata endpointhighServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

- SSRF:`SYSTEM "http://169.254.169.254/latest/meta-data/"`
.agents/skills/deserialization-xxe/SKILL.md · 101 lines

How it starts

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

deserialization-xxe — 反序列化与解析器漏洞专项深度挖掘

何时调用(触发条件)

  • XML 导入/上传、SOAP 接口、Office/Excel 解析
  • 序列化数据入口(Java readObject、PHP unserialize、Python pickle、.NET BinaryFormatter)
  • JSON 深合并/深拷贝(Node.js 原型污染)
  • yaml.load 未指定安全 Loader
  • 代码审计发现危险函数(见 source-code-audit

一、漏洞类型全景

类型 语言/场景 修复
H1. 反序列化 Java/PHP/Python/.NET 禁用危险反序列化、白名单
H2. XXE XML导入、SOAP、Office解析 禁用外部实体
H3. 原型污染 Node.js对象合并 过滤危险键

二、反序列化专项

各语言危险入口

Java:   readObject / XMLDecoder / JNDI lookup / JdbcRowSetImpl / TemplatesImpl
PHP:    unserialize / phar反序列化
Python: pickle.loads / yaml.load(Loader=Loader)
.NET:   BinaryFormatter / XMLSerializer

利用工具

语言 工具
Java ysoserial / marshalsec(RMI/LDAP 起服务)
PHP phpggc
Python pickle 手工构造

利用链思路

  • Java:Gadget 链(CommonsCollections、CommonsBeanutils 等)→ RMI/LDAP 打 JNDI
  • PHP:POP 链(Laravel/ThinkPHP/Yii 框架 gadget)+ phar 协议触发
  • Python:pickle 反序列化执行命令
  • 入口识别:base64/hex 编码的序列化流、rO0AB(Java)、a:{}(PHP)、O:8:(PHP对象)

三、XXE 专项

基础 Payload

<?xml version="1.0"?>
<!DOCTYPE foo [
  <!ENTITY xxe SYSTEM "file:///etc/passwd">
]>
<foo>&xxe;</foo>

进阶利用

  • 无回显:外部 DTD + 带外(OOB)读取文件
  • SSRF:SYSTEM "http://169.254.169.254/latest/meta-data/"
  • 文件读取:file:///etc/passwdphp://filter/read=convert.base64-encode/resource=config.php
  • 协议:http/ftp/gopher
  • Office 文档 XXE:docx/xlsx 内 XML 注入外部实体

触发场景

  • XML/Excel/CSV 导入
  • SOAP 接口
  • 文档预览/转换
  • SVG 上传(图片上传点也测 XXE)

四、原型污染专项(Node.js)

__proto__ / constructor.prototype / constructor.prototype.__proto__

触发场景

  • JSON.parse 后深合并(lodash.merge、Object.assign 递归合并)
  • 配置合并、查询参数合并

利用思路

  • 污染 __proto__.isAdmin=true / __proto__.shell=...
  • 污染 __proto__.env(pug/ejs 模板引擎 RCE)
  • 污染 Object.prototype 影响全局校验逻辑

五、验证要点

  • 反序列化:先确认可控输入点与编码方式,再选 gadget 链验证 RCE
  • XXE:先测回显(文件读取),无回显用 OOB DNSLog 验证
  • 原型污染:控制台/接口验证 Object.prototype 被污染
  • 每个 payload 至少尝试到 Level 4 绕过(编码/变形/协议)

六、修复建议

  • 禁用危险反序列化或使用白名单/黑名单过滤
  • XML 解析禁用外部实体(XXE 防护)
  • yaml 使用 SafeLoader
  • 深合并过滤 __proto__/constructor
  • 输入校验:拒绝序列化对象格式(按业务白名单)

Read the full file on GitHub · 101 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. 10d ago First seen · 101 lines · 78 tokens per session scan C 01492f968dfa

Subscribe to this mod's changes

deserialization-xxe is a skill published in the GitHub repository zhaji2333/CkSKILLS (80 stars, last pushed 9d ago), licensed MIT. It adds 78 tokens to every session and 1,047 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it C with 1 finding (cloud metadata endpoint). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

new

Create a new project to start development quickly.

clacky-ai/openclacky · 10 tokens

winui-setup

Install and verify the prerequisites the win-dev-skills WinUI 3 toolchain depends on — .NET SDK 8.0.100+, WinApp CLI 0.6+, and Developer Mode. Use only when the user explicitly asks to set up or repair the toolchain. Do not invoke automatically when another skill reports a missing prerequisite; tell the user what is…

microsoft/win-dev-skills · 88 tokens

winui-wpf-migration

Migrate WPF applications to WinUI 3 — namespace replacement (System.Windows → Microsoft.UI.Xaml), control mapping (DataGrid→ListView, WrapPanel→ItemsRepeater, TabControl→TabView), threading (Dispatcher→DispatcherQueue), imaging (System.Drawing→BitmapImage), MVVM conversion to CommunityToolkit.Mvvm, and…

microsoft/win-dev-skills · 100 tokens

xcode-compilation-analyzer

Analyze Swift and mixed-language compile hotspots using build timing summaries and Swift frontend diagnostics, then produce a recommend-first source-level optimization plan. Use when a developer reports slow compilation, type-checking warnings, expensive clean-build compile phases, long CompileSwiftSources tasks…

AvdLee/Xcode-Build-Optimization-Agent-Skill · 74 tokens

cli-builder

Build production-quality CLIs with language detection and a five-step approval-gated workflow. Use when wrapping an existing module or app. Don't use for GUI/TUI apps, web APIs, or one-off shell scripts.

luongnv89/skills · 46 tokens

rails-dev

Opinionated Rails conventions: rich models, concerns, CRUD-everything, state-as-records, minimal dependencies, Minitest with fixtures. Load this skill BEFORE any code-level thinking, not only before editing a file. It is required the moment a task touches Rails code in ANY way: designing or even just discussing a data…

tech-leads-club/agent-skills · 199 tokens