{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-119028","id":"CVE-2026-119028","title":"oapi-codegen code execution via enum entries in OpenAPI schemas","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.","descriptionLong":"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.","published":"2026-10-29T11:36:34.692Z","updated":"2026-10-31T02:47:36.084823482Z","reserved":"2026-10-29T11:32:05.290Z","status":"Awaiting Analysis","rejected":false,"assigner":"VulnCheck","metric":{"version":"4.0","score":8.7,"vector":"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","rating":"high","source":"VulnCheck"},"metrics":[{"version":"4.0","score":8.7,"vector":"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","rating":"high","source":"VulnCheck"},{"version":"4.0","score":8.7,"vector":"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","rating":"high","source":"vulncheck.com"},{"version":"4.0","score":null,"vector":"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","rating":"unrated","source":"OSV"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"VulnCheck"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"vulncheck.com"}],"rating":"high","products":["oapi-codegen"],"affectedProducts":[{"vendor":"oapi-codegen","product":"oapi-codegen","defaultStatus":"unaffected","versions":[{"version":"2.0.0","lessThan":"2.8.1","status":"affected","versionType":"semver"}],"platforms":[]}],"packages":[],"cwes":["CWE-94"],"aliases":[],"references":[{"url":"https://github.com/oapi-codegen/oapi-codegen/security/advisories/GHSA-g2vv-83pm-v2hc","tags":["vendor-advisory","advisory"]},{"url":"https://github.com/oapi-codegen/oapi-codegen/pull/2626","tags":["patch","issue-tracking","fix"]},{"url":"https://github.com/oapi-codegen/oapi-codegen/commit/068f1bcd16e4724c72d78d6774008a877b8297b1","tags":["patch","fix"]},{"url":"https://github.com/oapi-codegen/oapi-codegen/blob/v2.8.0/pkg/codegen/templates/constants.tmpl#L16","tags":["technical-description","article"]},{"url":"https://github.com/oapi-codegen/oapi-codegen/blob/v2.0.0/pkg/codegen/templates/constants.tmpl#L12","tags":["technical-description","article"]},{"url":"https://github.com/oapi-codegen/oapi-codegen/releases/tag/v2.8.1","tags":["release-notes","advisory"]},{"url":"https://github.com/oapi-codegen/oapi-codegen/security/advisories/GHSA-xrqw-w576-xgj2","tags":["related","vendor-advisory","advisory"]},{"url":"https://www.vulncheck.com/advisories/oapi-codegen-2.0.0-before-2.8.1-code-injection-via-non-string-enum-values","tags":["third-party-advisory","advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/119xxx/CVE-2026-119028.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-119028","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00422,"epssPercentile":0.37244,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-119028","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-119028","ok":true,"note":"Awaiting Analysis"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-119028","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-119028","ok":true,"note":"scored 2026-11-19"}],"aiTitle":true,"tech":[],"critical":[],"attention":null}