CVE-2023-40171CWE-209

Dispatch writes JWT tokens in error message

Critical · published August 17, 2023

CVSS v3.1
9.1
EPSS
1%
Percentile
60.4
In the wild
Unconfirmed
What it is

🚨 An error message could leak your JWT Secret Key! This critical vulnerability in Dispatch opens the door for attackers to take over any account with just a little crafty token manipulation. 🔥 Think of it like a restaurant that accidentally reveals the secret recipe for its signature dish in a customer complaint — suddenly, anyone can recreate it without permission! In this case, the secret sauce is your JWT Secret Key, and bad actors can whip up malicious tokens with it. If your server exposes the JWT Secret Key, attackers could forge JWTs and impersonate any user on your Dispatch instance — an absolute disaster waiting to happen! Your entire authentication system is at risk, allowing unauthorized access and control over accounts. This means sensitive data could be at stake and the integrity of your platform compromised.

Put simply

Think of it like a restaurant that accidentally reveals the secret recipe for its signature dish in a customer complaint — suddenly, anyone can recreate it without permission! In this case, the secret sauce is your JWT Secret Key, and bad actors can whip up malicious tokens with it. CVE-2023-40171 arises when the Dispatch Plugin - Basic Authentication Provider responds with the JWT Secret Key in error messages when failing to decode a token, allowing anyone with this key to create valid tokens for any user.

What to do

If your server exposes the JWT Secret Key, attackers could forge JWTs and impersonate any user on your Dispatch instance — an absolute disaster waiting to happen! Your entire authentication system is at risk, allowing unauthorized access and control over accounts. This means sensitive data could be at stake and the integrity of your platform compromised. To mitigate this risk, rotate the secret stored in the `DISPATCH_JWT_SECRET` environment variable in your `.env` file immediately. Upgrade to the latest version from the 20230817 release, which includes the fix for this vulnerability. Regularly monitor your logs for any suspicious activity while you implement these changes. You've got this! Following these steps will secure your instance and restore safety to your Dispatch environment. 🛡️

The record
Technical detail
CVSS v3.1
9.1 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.00935 · 60.4th percentile
Weakness
CWE-209 · Generation of Error Message Containing Sensitive Information
Published
2023-08-17T21:19Z
EPSS history
Timeline
  • 17 AUG 21:19Z
    Dispatch writes JWT tokens in error message
    cvelistv5