CVE-2026-119028
8.7high
oapi-codegen 2.0.0 before 2.8.1 Code Injection via Non-String Enum Values
- Severity
- 8.7high CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.42% (higher than 38% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| oapi-codegen oapi-codegen | from 2.0.0 before 2.8.1 | CVE List |
All scores
| VulnCheck | 8.7high CVSS:4.0 | 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 |
| VulnCheck | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-119028 changed 2026-10-29 | CVE Terms of Use |
| NVD | CVE-2026-119028 changed 2026-10-29 | Public domain |