CVE-2026-119028 json
oapi-codegen 2.0.0 before 2.8.1 Code Injection via Non-String Enum Values
published 2026-10-29 11 d ago modified 2026-10-29 10 d ago also EUVD-2026-112756
- cvss
- 8.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 36%
- public exploits
- 0
- none known
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.
Patch / fix
- oapi-codegen oapi-codegen 2.8.1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-119028 updated cvss 7.8
github.com/oapi-codegen/oapi-codegen: oapi-codegen: Arbitrary code execution via crafted OpenAPI enum entries
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 11 d ago
Exploit prediction
0.42% chance of exploitation in the next 30 days, higher than 36% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 8.7 | 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 |
| CNA | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| CNA | 4.0 | 8.7 | 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 |
Affected products
- oapi-codegen oapi-codegen
Classification
- Weakness
-
- CWE-94 Improper Control of Generation of Code
References
-
github.com
/oapi-codegen/oapi-codegen/pull/2626
patch, issue-tracking
-
github.com
/oapi-codegen/oapi-codegen/commit/068f1bcd16e4724c72d78d6774008a877b8297b1
patch
-
github.com
/oapi-codegen/oapi-codegen/security/advisories/GHSA-g2vv-83pm-v2hc
vendor-advisory
-
github.com
/oapi-codegen/oapi-codegen/security/advisories/GHSA-xrqw-w576-xgj2
related, vendor-advisory
-
github.com
/oapi-codegen/oapi-codegen/blob/v2.8.0/pkg/codegen/templates/constants.tmpl#L16
technical-description
-
github.com
/oapi-codegen/oapi-codegen/blob/v2.0.0/pkg/codegen/templates/constants.tmpl#L12
technical-description
-
github.com
/oapi-codegen/oapi-codegen/releases/tag/v2.8.1
release-notes
-
vulncheck.com
/advisories/oapi-codegen-2.0.0-before-2.8.1-code-injection-via-non-string-enum-values
third-party-advisory
Sources
- CVE List CVE-2026-119028
- NVD CVE-2026-119028
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.