{"id":"CVE-2026-119028","aliases":[],"cve":{"records":[{"id":"CVE-2026-119028","source":"VulnCheck","state":"PUBLISHED","reasons":[],"replacements":[],"disputed":false,"unsupportedWhenAssigned":false,"reserved":"2026-10-29T11:32:05.290Z","published":"2026-10-29T11:36:34.692Z","modified":"2026-10-29T14:08:24.785Z"}],"publishers":[{"name":"VulnCheck","role":"CNA","organizationId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","modified":"2026-10-29T11:36:34.692Z"},{"name":"CISA-ADP","role":"ADP","organizationId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","modified":"2026-10-29T14:08:24.785Z"}],"references":[{"url":"https://github.com/oapi-codegen/oapi-codegen/security/advisories/GHSA-g2vv-83pm-v2hc","tags":["vendor-advisory"],"source":"VulnCheck"},{"url":"https://github.com/oapi-codegen/oapi-codegen/pull/2626","tags":["patch","issue-tracking"],"source":"VulnCheck"},{"url":"https://github.com/oapi-codegen/oapi-codegen/commit/068f1bcd16e4724c72d78d6774008a877b8297b1","tags":["patch"],"source":"VulnCheck"},{"url":"https://github.com/oapi-codegen/oapi-codegen/blob/v2.8.0/pkg/codegen/templates/constants.tmpl#L16","tags":["technical-description"],"source":"VulnCheck"},{"url":"https://github.com/oapi-codegen/oapi-codegen/blob/v2.0.0/pkg/codegen/templates/constants.tmpl#L12","tags":["technical-description"],"source":"VulnCheck"},{"url":"https://github.com/oapi-codegen/oapi-codegen/releases/tag/v2.8.1","tags":["release-notes"],"source":"VulnCheck"},{"url":"https://github.com/oapi-codegen/oapi-codegen/security/advisories/GHSA-xrqw-w576-xgj2","tags":["related","vendor-advisory"],"source":"VulnCheck"},{"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"],"source":"VulnCheck"}],"weaknesses":[{"id":"CWE-94","description":"Improper Control of Generation of Code ('Code Injection')","source":"VulnCheck"}],"applicability":[],"prioritization":[{"source":"CISA-ADP","type":"SSVC","role":"CISA Coordinator","timestamp":"2026-10-29T14:08:08.391763Z","decisions":[{"name":"Exploitation","value":"none"},{"name":"Automatable","value":"no"},{"name":"Technical Impact","value":"total"}]}]},"title":"oapi-codegen 2.0.0 before 2.8.1 Code Injection via Non-String Enum Values","titleSource":"VulnCheck","descriptionSource":"VulnCheck","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.","score":8.8,"severity":"high","published":"2026-10-29T11:36:34.692Z","modified":"2026-10-29T14:08:24.785Z","withdrawn":false,"knownExploited":false,"affected":[],"products":[{"vendor":"oapi-codegen","name":"oapi-codegen","platforms":[],"versions":[{"version":"2.0.0","status":"affected","lessThan":"2.8.1","versionType":"semver"}],"defaultStatus":"unaffected","packageURL":"pkg:golang/github.com/oapi-codegen/oapi-codegen/v2","packageIdentity":{"ecosystem":"Go","name":"github.com/oapi-codegen/oapi-codegen/v2"},"cpes":[],"source":"VulnCheck","url":"https://www.cve.org/CVERecord?id=CVE-2026-119028"}],"remediation":[],"references":["https://github.com/oapi-codegen/oapi-codegen/security/advisories/GHSA-g2vv-83pm-v2hc","https://github.com/oapi-codegen/oapi-codegen/pull/2626","https://github.com/oapi-codegen/oapi-codegen/commit/068f1bcd16e4724c72d78d6774008a877b8297b1","https://github.com/oapi-codegen/oapi-codegen/blob/v2.8.0/pkg/codegen/templates/constants.tmpl#L16","https://github.com/oapi-codegen/oapi-codegen/blob/v2.0.0/pkg/codegen/templates/constants.tmpl#L12","https://github.com/oapi-codegen/oapi-codegen/releases/tag/v2.8.1","https://github.com/oapi-codegen/oapi-codegen/security/advisories/GHSA-xrqw-w576-xgj2","https://www.vulncheck.com/advisories/oapi-codegen-2.0.0-before-2.8.1-code-injection-via-non-string-enum-values"],"sources":[{"name":"CVE","id":"CVE-2026-119028","modified":"2026-10-29T14:08:24.785Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-119028"}],"assessments":[{"source":"VulnCheck","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","score":8.7},{"source":"VulnCheck","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8}],"sourceAffected":[],"observedAt":"2026-10-29T14:12:03.259Z","kev":{"status":"not-listed","checkedAt":"2026-10-31T10:50:31.656Z"},"coverage":[{"source":"NVD","status":"available","checkedAt":"2026-10-29T14:15:37.256Z","attemptedAt":"2026-10-29T14:15:37.256Z"},{"source":"GHSA","status":"available","checkedAt":"2026-10-29T14:15:37.314Z","attemptedAt":"2026-10-29T14:15:37.314Z"},{"source":"EUVD","status":"available","checkedAt":"2026-10-29T14:15:36.784Z","attemptedAt":"2026-10-29T14:15:36.784Z"},{"source":"EPSS","status":"no-result","checkedAt":"2026-10-29T14:15:37.596Z","attemptedAt":"2026-10-29T14:15:37.596Z"}],"evidence":[{"source":"ENISA EUVD","id":"EUVD-2026-112756","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-112756","modified":"Oct 29, 2026, 11:36:34 AM","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","checkedAt":"2026-10-29T14:15:36.784Z"},{"source":"NVD","id":"CVE-2026-119028","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-119028","modified":"2026-10-29T12:17:12.310","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","checkedAt":"2026-10-29T14:15:37.256Z"},{"source":"NVD","id":"CVE-2026-119028","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-119028","modified":"2026-10-29T12:17:12.310","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","checkedAt":"2026-10-29T14:15:37.256Z"},{"source":"GitHub Advisory Database","id":"GHSA-qf68-jmvg-6fww","url":"https://github.com/advisories/GHSA-qf68-jmvg-6fww","modified":"2026-10-29T12:30:45Z","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","checkedAt":"2026-10-29T14:15:37.314Z"}],"aiSummary":{"text":"oapi-codegen versions 2.0.0 before 2.8.1 have a code injection vulnerability via non-string enum values in OpenAPI documents. Attackers can inject Go code, executing it when the generated package is built and imported. Affected versions are 2.0.0 to less than 2.8.1.","model":"@cf/meta/llama-3.3-70b-instruct-fp8-fast","generatedAt":"2026-10-30T09:34:52.793Z","sources":[{"name":"CVE","url":"https://www.cve.org/CVERecord?id=CVE-2026-119028"}]}}