{"items":[{"id":"NVI-00015274","kind":"vulnerability","title":"swagger-typescript-api vulnerable to code injection via unescaped `servers[0].url` in fetch http-client template","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-hqj5-cw9f-rx67","CVE-2026-54662"],"plain_summary":"GitHub lists this reviewed advisory for swagger-typescript-api. 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-4fa169f10a4b87ab38f06949eb58b916"],"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":[{"kind":"CVSS","as_of":"2026-07-29T14:26:39.000Z","value":"8.3 high","meaning":"GitHub source severity; exploitability and local consequence require separate evidence.","source_id":"sr-4fa169f10a4b87ab38f06949eb58b916"}],"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-4fa169f10a4b87ab38f06949eb58b916","url":"https://github.com/advisories/GHSA-hqj5-cw9f-rx67","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-hqj5-cw9f-rx67","publisher":"GitHub Advisory Database","observed_at":"2026-11-03T09:59:04.660Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-4fa169f10a4b87ab38f06949eb58b916"],"technology":"swagger-typescript-api","known_exclusions":[],"conditions_summary":"### Summary\n\n`swagger-typescript-api` interpolates `servers[0].url` directly into a TypeScript class-body field initializer of the generated **fetch** `HttpClient` (`templates/base/http-clients/fetch-http-client.ejs:75`), without any escaping. A malicious URL containing a `\"` closes the string literal that initializes `public baseUrl` and exposes the surrounding *class body* to injection. The most direct exploit declares a new `static` field whose initializer is an async IIFE — TypeScript evaluates static field initializers at **class definition time**, which is at module load. A consumer who imports the generated client (or anything that transitively imports it) executes the injected code with no further interaction — no instantiation, no method call, no use of the baseUrl. The attacker controls the OpenAPI spec; the victim is whoever runs the generator and imports the result.\n\nThis is the highest-impact sink in the package: the trigger requires only a bare `import` of the generated module.\n\n### Details\n\n`createApiConfig` in `src/code-gen-process.ts:591` sets the templated `baseUrl` from the spec without sanitization:\n\n```ts\nreturn {\n  ...\n  baseUrl: serverUrl,     // <-- serverUr","public_affected_ranges":["<= 13.12.1"]}],"null_published_at":"2026-11-03T10:03:26.566Z","source_updated_at":"2026-07-29T14:26:39.000Z","source_disclosed_at":"2026-07-29T14:26:38.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-03T09:59:04.660Z"}],"next_cursor":null,"snapshot_revision":"42594"}