Back to CVE records
High 8.8Published Oct 29, 2026

CVE-2026-119028oapi-codegen 2.0.0 before 2.8.1 Code Injection via Non-String Enum Values

Updated under an hour ago ()

Does this affect you?

It affects oapi-codegen. Add what you run to find out whether that includes you.

No exploitation reported and no EPSS estimate yet.

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.

Free: a daily email for up to 3 products and the weekly digest. No card, no password. By continuing you agree to the Terms and Privacy Policy.

CVSS
8.8 HIGH (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-94
Known exploited
Not in CISA's KEV catalog
EPSS (exploitation in the next 30 days)
Not loaded for this CVE
Assigned by
VulnCheck
NVD analysis
Awaiting Analysis
Record last updated
Oct 29, 2026
First seen by InfoSec Signals
Oct 29, 2026

Affected products

Affected products
oapi-codegen oapi-codegen
oapi_codegen:oapi_codegen (from the name)
from 2.0.0 before 2.8.1
CNA record

References

References

The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.

Essential cookies only, unless you allow a Google ads cookie. See our .