{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-119027","id":"CVE-2026-119027","title":"oapi-codegen code execution via server names in OpenAPI documents","description":"oapi-codegen 2.5.0 before 2.8.1 contains a code injection vulnerability that allows attackers to inject Go code by supplying a crafted servers[].x-go-name value emitted unescaped by the server-urls template. Attackers who control an OpenAPI document can define an injected func init() that executes when the victim builds and imports the generated package.","descriptionLong":"oapi-codegen 2.5.0 before 2.8.1 contains a code injection vulnerability that allows attackers to inject Go code by supplying a crafted servers[].x-go-name value emitted unescaped by the server-urls template. Attackers who control an OpenAPI document can define an injected func init() that executes when the victim builds and imports the generated package.","published":"2026-10-29T11:36:34.029Z","updated":"2026-10-31T02:47:37.095667190Z","reserved":"2026-10-29T11:32:04.895Z","status":"Awaiting Analysis","rejected":false,"assigner":"VulnCheck","metric":{"version":"4.0","score":7.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/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":7.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"high","source":"VulnCheck"},{"version":"4.0","score":7.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/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:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"unrated","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"VulnCheck"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/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.5.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/server-urls.tmpl#L5-L7","tags":["technical-description","article"]},{"url":"https://github.com/oapi-codegen/oapi-codegen/blob/v2.5.0/pkg/codegen/templates/server-urls.tmpl#L4-L5","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-rjwr-m7qx-3fjr","tags":["related","vendor-advisory","advisory"]},{"url":"https://www.vulncheck.com/advisories/oapi-codegen-2.5.0-before-2.8.1-code-injection-via-servers-x-go-name-extension","tags":["third-party-advisory","advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/119xxx/CVE-2026-119027.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-119027","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.00394,"epssPercentile":0,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-119027","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-119027","ok":true,"note":"Awaiting Analysis"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-119027","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-119027","ok":true,"note":"scored "}],"aiTitle":true,"tech":[],"critical":[],"attention":null}