CVE-2026-119028

HIGH CVSS 4.0: 8.7 EPSS 0.63%
Updated Oct 29, 2026
oapi-codegen
Parameter Value
CVSS 8.7 (HIGH)
Affected Versions before 2.8.1
Type CWE-94 (Code Injection)
Vendor oapi-codegen
Public PoC No

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.

Attack Parameters

Attack Vector
Network
Can be exploited remotely
Attack Complexity
Low
Easy to exploit
Attack Requirements
None
No additional conditions
Privileges Required
None
No privileges needed
User Interaction
Passive
Minimal interaction

Impact Assessment

Confidentiality
High
Complete data leak
Integrity
High
Complete data modification
Availability
High
Complete denial of service

CVSS Vector v4.0

Weakness Type (CWE)