—
GO-2026-6016
oapi-codegen: OpenAPI Server Description Escapes Generated Go Comment and Injects Executable Code in github.com/oapi-codegen/oapi-codegen
Quick fix
GO-2026-6016 — github.com/oapi-codegen/oapi-codegen/v2: upgrade to the fixed version with the command below.
go get github.com/oapi-codegen/oapi-codegen/v2@v2.7.1 Details
oapi-codegen: OpenAPI Server Description Escapes Generated Go Comment and Injects Executable Code in github.com/oapi-codegen/oapi-codegen
Are you affected?
Enter the version of the package you're using.
Affected packages
Go / github.com/oapi-codegen/oapi-codegen
Introduced in:
0 No fixed version published yet for github.com/oapi-codegen/oapi-codegen (go modules). Pin to a known-safe version or switch to an alternative.
Go / github.com/oapi-codegen/oapi-codegen/v2
Introduced in:
0 Fixed in: 2.7.1 Fix
go get github.com/oapi-codegen/oapi-codegen/v2@v2.7.1