Submit #838568: antlr ANTLR4 4.13.2 Code Injectioninfo

Titleantlr ANTLR4 4.13.2 Code Injection
DescriptionANTLR4 grammar files (.g4) support embedded action blocks — @header { }, @members { }, @init { }, @after { }, and inline { } actions — that are injected verbatim and without sanitization into the generated source code. Any system that accepts .g4 files from untrusted sources and compiles/executes the generated output is fully compromised. The attack requires no special privileges; a single .g4 file causes Remote Code Execution upon class loading.
Source⚠️ https://github.com/wooyun123/wooyun/issues/4
User
 jiazhou (UID 89028)
Submission05/27/2026 10:49 (1 month ago)
Moderation06/27/2026 20:28 (1 month later)
StatusAccepted
VulDB entry374495 [antlr ANTLR4 up to 4.13.2 Grammar Action Block OutputFile.java code injection]
Points20

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!