CWE-94: Code Injection
16 real-world CVEs classified as CWE-94: Code Injection. Each one is a short hands-on exercise in Hexret: find the vulnerable line, follow the exploit and learn the fix.
- CVE-2026-15410high 7.22026
SonicWall SMA1000 remove_hotfix path traversal to root execution
The privileged hotfix-removal workflow accepts traversal segments in a hotfix path, then marks the resolved file executable and runs it with Bash as root.
- CVE-2026-35178critical 9.32026
Workbench malicious timezone cookie dynamic PHP code injection
An overrideable cookie value is loaded without picklist validation and concatenated into a create_function body, so timestamp formatting compiles attacker-controlled PHP syntax.
- CVE-2025-49704high 8.82025
ToolShell: SharePoint ExcelDataSet deserialization
Authenticated ToolPane control markup can instantiate an allowed PerformancePoint type whose compressed table property decompresses and deserializes attacker-controlled state with legacy .NET formatters.
- CVE-2023-31315high 7.52024
Sinkclose: AMD SMM save-state redirection
A ring-0 attacker can set the TClose compatibility bit before an SMI so SMM accesses to the protected TSeg range are redirected through MMIO, exposing the save-state path to attacker influence.
- CVE-2024-4367high 8.82024
PDF.js FontMatrix generated-code injection
A PDF-supplied FontMatrix could contain strings that were serialized without quoting into a generated glyph function and executed as JavaScript when the glyph rendered.
- CVE-2023-24955high 7.22023
SharePoint BDC proxy-namespace code injection
A Site Owner can place C# syntax in a Business Data Connectivity WebServiceProxyNamespace property; SharePoint inserts the unvalidated string into a CodeDOM namespace, compiles the generated assembly, and later instantiates its type.
- CVE-2022-42889critical 9.82022
Text4Shell: default script lookup in string interpolation
A string-interpolation helper enables every built-in lookup by default, including one that evaluates scripts, so untrusted input containing an interpolation reference runs code.
- CVE-2022-30190high 7.82022
Follina: ms-msdt URL-scheme code injection
A document-hosted script invokes the local MSDT diagnostic handler through the ms-msdt URL scheme, and a $() subexpression inside a diagnostic parameter is evaluated as a PowerShell command, giving macro-less code execution.
- CVE-2022-22954critical 9.82022
Workspace ONE device parameter FreeMarker evaluation
Unauthenticated catalog-portal error paths embedded deviceUdid or deviceType query values into FreeMarker-rendered output. A value containing a FreeMarker expression was evaluated as template source rather than emitted as data, exposing built-in utility classes available to the template environment.
- CVE-2022-22965critical 9.82022
Spring4Shell: data binding reaches the ClassLoader
A denylist meant to keep classLoader unbindable only fires on the exact reflection Class type, so a nested bind reaching a ClassLoader through another type slips past it and drives arbitrary code execution.
- CVE-2022-0811high 8.82022
cr8escape: a pod sysctl value smuggles a second kernel parameter
A pod sysctl value is serialized into a delimiter-joined argument without being checked for the delimiter, so one approved setting smuggles a second kernel parameter that runs code as root on the node.
- CVE-2022-22947critical 10.02022
Spring Cloud Gateway SpEL code injection via Actuator route
An argument value from an Actuator-defined route filter is evaluated as a Spring Expression Language expression in an unrestricted context, so a crafted route runs arbitrary code on refresh.
- CVE-2021-22204high 7.82021
ExifTool DjVu annotation eval injection (RCE)
A metadata parser expands escape sequences in a quoted annotation by passing the untrusted string through eval, so a crafted quoted value breaks out and runs arbitrary code.
- CVE-2021-22205critical 10.02021
GitLab image-suffix to ExifTool parser mismatch
GitLab selected ExifTool from an upload's image suffix, while ExifTool selected its parser from file content and reached a vulnerable DjVu annotation eval.
- CVE-2017-8759high 7.82017
.NET WSDL additional-address CRLF code injection
The SOAP WSDL parser generated C# source from service addresses and tried to comment out additional addresses with //; a CRLF inside an address escaped the comment, injected a new source line, and was compiled by csc.exe.
- CVE-2017-7494critical 9.82017
SambaCry: arbitrary shared-library load via a named pipe
A client-supplied pipe name is passed straight to a module loader with no path check, so a name that is the full path to an uploaded shared object makes the server dlopen and run it.