Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

Skip to content
Check your stack
CVE-2026-119028high8.8

oapi-codegen 2.0.0 before 2.8.1 Code Injection via Non-String Enum Values

Impact

oapi-codegen versions 2.0.0 before 2.8.1 have a code injection vulnerability via non-string enum values in OpenAPI documents. Attackers can inject Go code, executing it when the generated package is built and imported. Affected versions are 2.0.0 to less than 2.8.1.

Summarized by @cf/meta/llama-3.3-70b-instruct-fp8-fast. Verify details against the original sources.

Affected packages

This source has no supported package-version data for matching. You can read the advisory here, but this record alone cannot power a dependency check.

Affected products

Vendor version evidence. Product records are separate from automatic dependency matching.

oapi-codegen · VulnCheck

oapi-codegen

1 range

Package identity

pkg:golang/github.com/oapi-codegen/oapi-codegen/v2Explore github.com/oapi-codegen/oapi-codegen/v2 →

Identity supplied by VulnCheck. Version matching requires compatible range evidence.

Compare with this publisher’s ranges. This does not inspect your installation.

affected

2.0.0 → before 2.8.1

semver versions

unaffected

unknown

Other versions: unaffected

Original source description

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.

Inside the record

Evidence available

Package identity
Version evidence
Remediation guidance · not supplied
Weakness classification
Additional publishers

Describes the evidence in this view, not whether the product is safe.

Original records

CVE-2026-119028

View the latest unmodified CVE JSON from the official source. It may be newer than this imported page.

cve.new JSON →

Underlying weaknesses

The source’s classification of what caused the vulnerability.

CWE-94 ↗

Improper Control of Generation of Code ('Code Injection')

VulnCheck

Related →
Contributing organizations · 2
VulnCheck

Assigning organization

2026-10-29
CISA-ADP

Additional data publisher

2026-10-29

What changed

Follow changes
No substantive changes have been recorded here yet. History starts when cve.new observes a change after tracking is enabled; earlier edits are not reconstructed.

Large field values are marked as truncated previews. Original source snapshots remain retained.

References

8 sources