oapi-codegen 2.0.0 before 2.8.1 contains a code injection vulnerability that allows attackers to inject Go code by supplying non-literal enum entries in integer, number, or boolean schemas. Attackers controlling an OpenAPI document can craft an enum entry that closes the const block in constants.tmpl and injects a func init(), executing code when the generated package is built and imported.
References
Configurations
No configuration.
History
29 Oct 2026, 12:17
| Type | Values Removed | Values Added |
|---|---|---|
| New CVE |
Information
Published : 2026-10-29 12:17
Updated : 2026-10-29 16:19
NVD link : CVE-2026-119028
Mitre link : CVE-2026-119028
CVE.ORG link : CVE-2026-119028
JSON object : View
Products Affected
No product.
CWE
CWE-94
Improper Control of Generation of Code ('Code Injection')
