PoC Monitor
← All CVEs
CVE-2026-119028published 29 Oct 2026 11:36 UTCData: JSON · API

Oapi-codegen

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

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.

First public PoC None yetno public PoC found
Public PoCs00 on GitHub
CVSS8.8high · scored by CNA · CWE-94
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

oapi-codegen oapi-codegen
  • >= 2.0.0, < 2.8.1

Fixed in 2.8.1

Timeline

Days relative to CVE publication
-2t=0+2+4+6+8CVE published29 Oct 2026 · t = 0

No public PoC found yet; not in CISA KEV.

PoC repositories

Found on GitHub.

No PoC repositories found yet.