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.

Project Subscriptions

Vendors Products
Oapi-codegen Subscribe
Oapi-codegen Subscribe
Advisories

No advisories yet.

Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Fri, 06 Nov 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Fri, 30 Oct 2026 23:45:00 +0000

Type Values Removed Values Added
First Time appeared Oapi-codegen
Oapi-codegen oapi-codegen
Vendors & Products Oapi-codegen
Oapi-codegen oapi-codegen

Thu, 29 Oct 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 29 Oct 2026 11:45:00 +0000

Type Values Removed Values Added
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.
Title oapi-codegen 2.5.0 before 2.8.1 Code Injection via servers[].x-go-name Extension
Weaknesses CWE-94
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_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'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-29T17:20:19.252Z

Reserved: 2026-10-29T11:32:04.895Z

Link: CVE-2026-119027

cve-icon Vulnrichment

Updated: 2026-10-29T15:37:45.666Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-29T12:17:12.167

Modified: 2026-10-29T18:17:29.510

Link: CVE-2026-119027

cve-icon Redhat

Severity : Important

Publid Date: 2026-10-29T11:36:34Z

Links: CVE-2026-119027 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-30T23:14:51Z

Weaknesses