Skip to content
High 8.8

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

CVE-2026-119028 First seen on SecPulse

Summary

oapi-codegen 2.0.0から2.8.1より前の版に、整数・数値・真偽値のスキーマで非リテラルのenum値を与えると、Goコードを埋め込まれる脆弱性があります。細工されたOpenAPI文書を読み込ませると、生成されたパッケージのビルドと取り込みの時点でコードが実行される恐れがあり、CVSS v3.1のスコアは8.8です。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.0.0から2.8.1より前の版に、整数・数値・真偽値のスキーマで非リテラルのenum値を与えると、Goコードを埋め込まれる脆弱性があります。細工されたOpenAPI文書を読み込ませると、生成されたパッケージのビルドと取り込みの時点でコードが実行される恐れがあり、CVSS v3.1のスコアは8.8です。2.8.1以降に更新してください。

Affected packages

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

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.

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