Skip to content
CORVASEC — Knowledge Defends
Vulnerability Explorer›CVE-2026-119028
VULNERABILITY

CVE-2026-119028

Common Vulnerabilities and Exposures record

HIGH

Summary

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.

Risk

CVSS
8.7
Severity
HIGH
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Timeline

Published
Oct 29, 2026 12:17
Modified
Oct 29, 2026 16:19
Last observed
Oct 29, 2026 13:00

CWE

CWE-94

References