Skip to content
High 7.7

oapi-codegenに任意のGoコードを実行される脆弱性、修正版は2.8.1

CVE-2026-119027 First seen on SecPulse

Summary

oapi-codegenの2.5.0から2.8.1より前のバージョンに、細工したGoコードを埋め込まれる脆弱性が見つかりました。OpenAPIドキュメントを用意できる攻撃者が、生成されたパッケージを利用側がビルドして取り込んだときにコードを実行できるおそれがあります。対応には2.8.1への更新が必要です。

AI summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

oapi-codegenの2.5.0から2.8.1より前のバージョンに、細工したGoコードを埋め込まれる脆弱性が見つかりました。OpenAPIドキュメントを用意できる攻撃者が、生成されたパッケージを利用側がビルドして取り込んだときにコードを実行できるおそれがあります。対応には2.8.1への更新が必要です。

Affected packages

PackageAffected → Fixed
oapi-codegenoapi-codegen
≥ 2.5.0, < 2.8.1→ 2.8.1
Original description The description as published by the source.

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.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details