Code injection via escaped generator comments
Published Oct 7, 2024 · Updated Oct 7, 2024
Code injection in RuoYi 4.7.9 and earlier allows remote attackers to inject malicious code through the code generation feature. The generator incorporates untrusted comment text into generated source without neutralizing comment terminators, so a crafted value escapes the intended comment and becomes code. The authoritative record treats access as unauthenticated but does not identify the request path; execution occurs when the poisoned output is built or run.
Summary
What happened
Code injection in RuoYi 4.7.9 and earlier allows remote attackers to inject malicious code through the code generation feature. The generator incorporates untrusted comment text into generated source without neutralizing comment terminators, so a crafted value escapes the intended comment and becomes code. The authoritative record treats access as unauthenticated but does not identify the request path; execution occurs when the poisoned output is built or run.
The record
- CVE
- CVE-2024-46076
- Published
- Oct 7, 2024
- Updated
- Oct 7, 2024
- Vendor
- yangzongzhuan
- Product
- RuoYi
- Classifications
- CWE-94, T1059
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Oct 7, 2024CVE publishedPublication date reported by the CVE source.
- Oct 7, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0 <=4.7.9
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- RuoYi code-generation comment-escape proof of conceptproof of concept · unverified
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo