expression-language-injection
Agent skill fromyaklang/hack-skills
Expression Language injection playbook. Use when Java EL, SpEL, OGNL, or MVEL expressions may evaluate attacker-controlled input in Spring, Struts2, Confluence, or similar frameworks.
How to install expression-language-injection
install expression-language-injection
# install the hack-skills pack with the skills CLI
npx skills add yaklang/hack-skills# or add only this skill to Claude Code: copy the folder
skills/expression-language-injection/
# into
~/.claude/skills/expression-language-injection/ (all projects)
.claude/skills/expression-language-injection/ (one project)
1# SKILL: Expression Language Injection — Expert Attack Playbook23> **AI LOAD INSTRUCTION**: Expert EL injection techniques covering SpEL (Spring), OGNL (Struts2), and Java EL (JSP/JSF). Distinct from SSTI — EL injection targets expression evaluators in Java frameworks, not template engines. Covers sandbox bypass, `_memberAccess` manipulation, actuator abuse, and real-world CVE chains.45## 0. RELATED ROUTING67- [ssti-server-side-template-injection](../ssti-server-side-template-injection/SKILL.md) for template engines (Jinja2, FreeMarker, Twig) — different attack surface8- [jndi-injection](../jndi-injection/SKILL.md) when EL evaluation leads to JNDI lookup910**Key distinction**: SSTI targets template rendering engines; EL injection targets expression evaluators embedded in Java frameworks. They share detection probes (`${7*7}`) but diverge in exploitation.1112---1314## 1. DETECTION — POLYGLOT PROBES1516```text17${7*7} → 49 = SpEL, OGNL, or Java EL18#{7*7} → 49 = SpEL (alternative syntax) or JSF EL19%{7*7} → 49 = OGNL (Struts2)20${T(java.lang.Math).random()} → random float = SpEL confirmed21%{#context} → object dump = OGNL confirmed22```2324### Disambiguation2526| Response to `${7*7}` | Response to `%{7*7}` | Engine |27|---|---|---|28| 49 | literal `%{7*7}` | SpEL or Java EL |29| literal `${7*7}` | 49 | OGNL (Struts2) |30| 49 | 49 | Both may be active |3132---3334## 2. SpEL (SPRING EXPRESSION LANGUAGE)3536### Where SpEL Appears37…
Excerpt shown under the repository's MIT license.
