Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-119027— oapi-codegen 2.5.0 before 2.8.1 Code Injection via servers[].x-go-name Extension

Quick assessment

Affected
oapi-codegen oapi-codegen
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

oapi-codegen 2.5.0 至 2.8.1(不含 2.8.1)版本中存在代码注入漏洞。攻击者可通过在 OpenAPI 文档中构造 字段,利用 模板未转义该值的问题,注入恶意 Go 代码。若攻击者能够控制 OpenAPI 文档,即可定义一个注入的 函数;当受害者构建并导入生成的包时,该函数将被执行。

CVSS 7.5 · High
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-119027

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
oapi-codegen 2.5.0 before 2.8.1 Code Injection via servers[].x-go-name Extension
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
对生成代码的控制不恰当(代码注入)
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
oapi-codegen oapi-codegen 2.5.0 ~ 2.8.1 -

II. Public POCs for CVE-2026-119027

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-119027

请登录查看更多情报信息。

Other References for CVE-2026-119027 (8)

IV. Related Vulnerabilities