{"items":[{"id":"NVI-00016301","kind":"vulnerability","title":"oapi-codegen: OpenAPI Server Description Escapes Generated Go Comment and Injects Executable Code","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-rjwr-m7qx-3fjr"],"plain_summary":"GitHub lists this reviewed advisory for github.com/oapi-codegen/oapi-codegen/v2. Published version ranges and source prerequisites are shown below; this is not an inspection of a visitor’s application.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-654c8ad2c4f7d187ec9078edce6991ec"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-654c8ad2c4f7d187ec9078edce6991ec","url":"https://github.com/advisories/GHSA-rjwr-m7qx-3fjr","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-rjwr-m7qx-3fjr","publisher":"GitHub Advisory Database","observed_at":"2026-11-04T09:59:26.779Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-654c8ad2c4f7d187ec9078edce6991ec"],"technology":"github.com/oapi-codegen/oapi-codegen/v2","known_exclusions":[],"conditions_summary":"## Summary\n\nThe vulnerability in oapi-codegen seems to be similar with CVE-2026-22785,  which is a generated-code injection issue where untrusted OpenAPI `summary` text is embedded into generated TypeScript MCP server source without proper escaping. `oapi-codegen` has a similar vulnerability in its server URL generator: untrusted OpenAPI `servers[].description` text is inserted into a generated Go line comment without normalizing embedded newlines. A crafted description can break out of the comment, add imports through `goimports`, and emit executable Go declarations into the generated package.\n\n> [!NOTE]\n> A vulnerability like this requires that it is missed in code review **and** that you then call the malicious method.\n> \n> Using an `init()` function could be enough to not require a direct call to the code, and instead rely on you importing the package, but either way, code review should be performed before any `oapi-codegen` generated code is executed.\n> \n> We **strongly recommend** all users to be reviewing changes to their generated code before they execute anything within it, to protect against supply chain attacks or malicious injected code.\n>\n> This is also why we recommen","public_affected_ranges":["<= 2.7.0"]}],"null_published_at":"2026-11-04T10:04:27.929Z","source_updated_at":"2026-07-17T18:50:17.000Z","source_disclosed_at":"2026-07-17T18:50:17.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"First indexed by Null; source disclosure date is shown separately.","null_first_observed_at":"2026-11-04T09:59:26.779Z"}],"next_cursor":null,"snapshot_revision":"42594"}