<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Software-Development - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/software-development/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 29 Jul 2026 14:24:07 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/software-development/feed.xml" rel="self" type="application/rss+xml"/><item><title>Swagger-typescript-api Vulnerable to Authorization Token Exfiltration via Spec $ref</title><link>https://feed.craftedsignal.io/briefs/2026-07-swagger-typescript-api-token-exfil/</link><pubDate>Wed, 29 Jul 2026 14:24:07 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-swagger-typescript-api-token-exfil/</guid><description>The `swagger-typescript-api` tool is vulnerable to authorization token exfiltration. When a developer provides an `--authorizationToken` to fetch an OpenAPI specification, the tool attaches this token to all subsequent HTTP requests made while resolving external `$ref` URLs within the spec. Critically, it lacks same-origin checks, allowing a malicious OpenAPI spec containing a `$ref` to an attacker-controlled URL to cause the authorization token (e.g., GitHub PAT, OAuth bearer) to be sent verbatim to the attacker. This credential disclosure provides an attacker with the same scope of access as the stolen token, affecting development environments, CI/CD pipelines, and multi-tenant SaaS platforms.</description><content:encoded><![CDATA[<p>The <code>swagger-typescript-api</code> tool, specifically versions up to and including 13.12.1, is vulnerable to authorization token exfiltration (CVE-2026-54660). This vulnerability arises when the tool is used to generate API clients from an OpenAPI specification, and a developer provides an <code>--authorizationToken</code> flag to authenticate against a private spec. The tool's <code>getRemoteRequestHeaders()</code> function unconditionally attaches this token to the <code>Authorization</code> header of <em>every</em> subsequent HTTP request made while resolving external <code>$ref</code> URLs within the specification. Crucially, it fails to perform a same-origin check, host allowlist, or scope-down, meaning that a maliciously crafted OpenAPI spec with an external <code>$ref</code> pointing to an attacker-controlled domain will cause the developer's sensitive token (such as a GitHub Personal Access Token, OAuth bearer token, or API key) to be sent verbatim to the attacker. This flaw poses a significant risk to development environments, CI/CD pipelines, and multi-tenant SaaS platforms, as the captured token grants attackers the same level of access as the legitimate developer.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious OpenAPI specification containing an external <code>$ref</code> pointing to an attacker-controlled URL (e.g., <code>http://attacker.example/exfil-endpoint/data.json</code>).</li>
<li>The attacker delivers this malicious spec to a developer or injects it into a trusted spec (e.g., via a compromised repository or supply chain attack).</li>
<li>A developer or automated CI/CD pipeline executes <code>swagger-typescript-api generate</code> against the malicious or compromised OpenAPI specification, supplying a sensitive authorization token via the <code>--authorizationToken</code> flag.</li>
<li>During the code generation process, <code>swagger-typescript-api</code> attempts to resolve the external <code>$ref</code> URLs defined within the spec.</li>
<li>The vulnerable <code>swagger-typescript-api</code> component <code>getRemoteRequestHeaders()</code> attaches the developer's full <code>--authorizationToken</code> value to the HTTP request without performing a same-origin check.</li>
<li><code>swagger-typescript-api</code> makes an outbound HTTP GET request to the attacker-controlled URL, including the sensitive token in the <code>Authorization</code> header.</li>
<li>The attacker's server receives the request and captures the exposed authorization token.</li>
<li>The attacker can then use the stolen token to gain unauthorized access to the services or resources associated with the token's scope, mimicking the developer's privileges.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The vulnerability, identified as CVE-2026-54660, directly leads to the exposure of sensitive credentials, typically high-value authorization tokens. The impact is significant, as the stolen token grants attackers the same scope of access as the developer or system it was stolen from. This could include full source-code read/write access via a GitHub Personal Access Token, full impersonation on an API via an OAuth bearer token, or extensive account access through an AWS-style API key, depending on the token's privileges. Affected use cases include developers fetching private OpenAPI specs, CI/CD pipelines regenerating clients from private specs, and multi-tenant SaaS platforms that generate per-tenant clients. The credential theft occurs at generation time, meaning the risk is realized as soon as <code>swagger-typescript-api generate</code> is run with a malicious spec and an authorization token.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Patch CVE-2026-54660 by upgrading <code>swagger-typescript-api</code> to a version greater than 13.12.1 as soon as a fix is released by the maintainers.</li>
<li>Implement robust network egress filtering for systems running <code>swagger-typescript-api</code> to prevent outbound connections to untrusted external URLs, particularly on non-standard ports.</li>
<li>Review and restrict the scope and lifetime of <code>--authorizationToken</code>s used with <code>swagger-typescript-api</code>, adhering to the principle of least privilege.</li>
<li>Run <code>swagger-typescript-api</code> in isolated environments (e.g., containers, ephemeral build agents) with minimal network access and permissions, similar to the SSRF mitigations suggested in the companion advisory.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>credential-theft</category><category>supply-chain</category><category>software-development</category><category>openapi</category><category>api-security</category><category>nodejs</category><category>code-injection</category><category>npm</category><category>node.js</category><category>code-generation</category></item></channel></rss>