{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-119027",
        "assignerOrgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10",
        "state": "PUBLISHED",
        "assignerShortName": "VulnCheck",
        "dateReserved": "2026-10-29T11:32:04.895Z",
        "datePublished": "2026-10-29T11:36:34.029Z",
        "dateUpdated": "2026-10-29T17:20:19.252Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10",
                "shortName": "VulnCheck",
                "dateUpdated": "2026-10-29T11:36:34.029Z"
            },
            "datePublic": "2026-10-24T00:00:00.000Z",
            "title": "oapi-codegen 2.5.0 before 2.8.1 Code Injection via servers[].x-go-name Extension",
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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."
                }
            ],
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "lang": "en",
                            "description": "Improper Control of Generation of Code ('Code Injection')",
                            "cweId": "CWE-94",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "vendor": "oapi-codegen",
                    "product": "oapi-codegen",
                    "defaultStatus": "unaffected",
                    "versions": [
                        {
                            "version": "2.5.0",
                            "lessThan": "2.8.1",
                            "status": "affected",
                            "versionType": "semver"
                        }
                    ],
                    "packageURL": "pkg:golang/github.com/oapi-codegen/oapi-codegen/v2"
                }
            ],
            "metrics": [
                {
                    "format": "CVSS",
                    "cvssV4_0": {
                        "version": "4.0",
                        "vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
                        "attackVector": "NETWORK",
                        "attackComplexity": "LOW",
                        "attackRequirements": "PRESENT",
                        "privilegesRequired": "NONE",
                        "userInteraction": "PASSIVE",
                        "vulnConfidentialityImpact": "HIGH",
                        "vulnIntegrityImpact": "HIGH",
                        "vulnAvailabilityImpact": "HIGH",
                        "subConfidentialityImpact": "NONE",
                        "subIntegrityImpact": "NONE",
                        "subAvailabilityImpact": "NONE",
                        "baseScore": 7.7,
                        "baseSeverity": "HIGH"
                    }
                },
                {
                    "format": "CVSS",
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H",
                        "attackVector": "NETWORK",
                        "attackComplexity": "HIGH",
                        "privilegesRequired": "NONE",
                        "userInteraction": "REQUIRED",
                        "scope": "UNCHANGED",
                        "confidentialityImpact": "HIGH",
                        "integrityImpact": "HIGH",
                        "availabilityImpact": "HIGH",
                        "baseScore": 7.5,
                        "baseSeverity": "HIGH"
                    }
                }
            ],
            "references": [
                {
                    "url": "https://github.com/oapi-codegen/oapi-codegen/security/advisories/GHSA-g2vv-83pm-v2hc",
                    "tags": [
                        "vendor-advisory"
                    ],
                    "name": "GitHub Security Advisory (GHSA-g2vv-83pm-v2hc)"
                },
                {
                    "url": "https://github.com/oapi-codegen/oapi-codegen/pull/2626",
                    "tags": [
                        "patch",
                        "issue-tracking"
                    ],
                    "name": "Pull Request #2626"
                },
                {
                    "url": "https://github.com/oapi-codegen/oapi-codegen/commit/068f1bcd16e4724c72d78d6774008a877b8297b1",
                    "tags": [
                        "patch"
                    ],
                    "name": "Patch Commit"
                },
                {
                    "url": "https://github.com/oapi-codegen/oapi-codegen/blob/v2.8.0/pkg/codegen/templates/server-urls.tmpl#L5-L7",
                    "tags": [
                        "technical-description"
                    ]
                },
                {
                    "url": "https://github.com/oapi-codegen/oapi-codegen/blob/v2.5.0/pkg/codegen/templates/server-urls.tmpl#L4-L5",
                    "tags": [
                        "technical-description"
                    ]
                },
                {
                    "url": "https://github.com/oapi-codegen/oapi-codegen/releases/tag/v2.8.1",
                    "tags": [
                        "release-notes"
                    ],
                    "name": "oapi-codegen v2.8.1 Release Notes"
                },
                {
                    "url": "https://github.com/oapi-codegen/oapi-codegen/security/advisories/GHSA-rjwr-m7qx-3fjr",
                    "tags": [
                        "related",
                        "vendor-advisory"
                    ],
                    "name": "GitHub Security Advisory (GHSA-rjwr-m7qx-3fjr)"
                },
                {
                    "name": "VulnCheck Advisory: oapi-codegen 2.5.0 before 2.8.1 Code Injection via servers[].x-go-name Extension",
                    "tags": [
                        "third-party-advisory"
                    ],
                    "url": "https://www.vulncheck.com/advisories/oapi-codegen-2.5.0-before-2.8.1-code-injection-via-servers-x-go-name-extension"
                }
            ],
            "credits": [
                {
                    "lang": "en",
                    "value": "Zachariah Mithani (AploSec)",
                    "type": "finder"
                }
            ],
            "x_generator": {
                "engine": "vulncheck-endgame"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "timestamp": "2026-10-29T15:37:44.678832Z",
                                "id": "CVE-2026-119027",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "total"
                                    }
                                ],
                                "role": "CISA Coordinator",
                                "version": "2.0.3"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2026-10-29T17:20:19.252Z"
                }
            }
        ]
    }
}