☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 2.1 🐛 CWE-532
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-51752

CVE-2024-51752 Weak Session Management in Workos
📅 PUBLISHED: 2024-11-05 19:16 UTC 🔄 UPDATED: 2026-09-23 20:37 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.25%
👁️
0.25% probability
6.1× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
2.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-51752 is a security vulnerability in the AuthKit library for Next.js, developed by WorkOS. The flaw allows refresh tokens, which are sensitive authentication credentials, to be logged to the console when the debug flag is enabled. While the debug flag is disabled by default, any environment where it is inadvertently or maliciously enabled could expose these tokens. This exposure could lead to session hijacking and unauthorized access to user accounts. The vulnerability has been patched in version 0.13.2, and all users are strongly advised to upgrade immediately. There are no known workarounds.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the @workos-inc/authkit-nextjs package, which is distributed via the npm registry. Organizations using this package should verify their dependency tree to ensure they are not using a vulnerable version. The package is a direct dependency for applications integrating WorkOS AuthKit for authentication. The supply chain risk is moderate, as the vulnerability requires the debug flag to be enabled, but the impact is high due to the potential exposure of refresh tokens.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Local (AV:L) - The attacker needs local access to the logs or console output.
  • Attack Complexity (AC): Low (AC:L) - No special conditions are required beyond the debug flag being enabled.
  • Privileges Required (PR): Low (PR:L) - The attacker needs to be able to read the logs or console output.
  • User Interaction (UI): None (UI:N) - No user interaction is required for exploitation.
  • Scope (S): Unchanged (S:U) - The vulnerability does not affect other components.
  • Confidentiality (C): High (C:H) - Refresh tokens are sensitive credentials.
  • Integrity (I): None (I:N) - The vulnerability does not allow modification of data.
  • Availability (A): None (A:N) - The vulnerability does not affect availability.

CVSS Score: 5.5 (Medium)

Threat Level: Medium. The vulnerability requires the debug flag to be enabled, which is not the default configuration. However, if enabled, the impact is significant as it exposes refresh tokens that can be used to impersonate users.

Deep Dive & Mechanics

The AuthKit library for Next.js includes a debug flag intended for development and troubleshooting purposes. When this flag is set to true, the library logs detailed information to the console, including refresh tokens. Refresh tokens are long-lived credentials used to obtain new access tokens without requiring the user to re-authenticate. If an attacker gains access to these logs (e.g., through a compromised server, shared development environment, or CI/CD pipeline), they can use the refresh tokens to generate new access tokens and maintain persistent access to the user's session.

The vulnerability is rooted in the logging mechanism of the library. The code likely uses console.log or a similar logging function to output debug information, and the refresh token is included in the logged data without proper sanitization or redaction.

Vulnerable vs. Patched Code

Vulnerable Code (version < 0.13.2):

// Example of vulnerable code
if (debug) {
  console.log('AuthKit Debug: Refresh Token:', refreshToken);
}

Patched Code (version >= 0.13.2):

// Example of patched code
if (debug) {
  console.log('AuthKit Debug: Refresh Token: [REDACTED]');
}

The patched version redacts the refresh token in the log output, ensuring that even if the debug flag is enabled, the sensitive token is not exposed.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • A Next.js application using @workos-inc/authkit-nextjs version < 0.13.2.
  • The debug flag must be enabled in the AuthKit configuration.

Exploitation Steps:

  1. Identify Target: Scan for Next.js applications using WorkOS AuthKit. Look for environment variables or configuration files that might indicate the debug flag is enabled.
  2. Gain Access to Logs: Obtain access to the application's console output or log files. This could be through:
    • Compromising a developer's workstation.
    • Accessing a shared development server.
    • Exploiting a separate vulnerability to read log files.
  3. Extract Refresh Tokens: Search the logs for lines containing "Refresh Token:" and extract the token value.
  4. Use Refresh Token: Use the extracted refresh token to obtain new access tokens and impersonate the user.

Example Command (using curl to simulate token usage):

curl -X POST https://api.workos.com/sessions/token \
  -H "Content-Type: application/json" \
  -d '{"client_id": "your_client_id", "refresh_token": "extracted_refresh_token"}'

Blue Team

Detection:

  • Monitor for the debug flag being enabled in AuthKit configuration.
  • Alert on any log entries containing "Refresh Token:".
  • Use the detection rules provided in the Detection Engineering section.

Mitigation:

  • Immediately upgrade to version 0.13.2 or later.
  • If upgrade is not possible, disable the debug flag in production and development environments.
  • Rotate all refresh tokens that may have been exposed.
  • Review access logs to identify any unauthorized use of refresh tokens.

Indicators of Compromise (IOCs)

  • Log Entries: Any log entry containing the string "Refresh Token:" followed by a token value.
  • Configuration: The presence of debug: true in the AuthKit configuration.
  • Network Traffic: Unusual API calls to WorkOS endpoints using refresh tokens from unexpected IP addresses.

Detection Engineering

YARA Rule

rule Detect_AuthKit_Refresh_Token_Leak {
  meta:
    description = "Detects log entries containing WorkOS AuthKit refresh tokens"
    author = "Valters IT"
    date = "2024-01-01"
    reference = "CVE-2024-51752"
  strings:
    $token_leak = /Refresh Token:\s*[A-Za-z0-9\-._~+/]+={0,2}/
  condition:
    $token_leak
}

Sigma Rule

title: WorkOS AuthKit Refresh Token Leak
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects log entries containing WorkOS AuthKit refresh tokens
author: Valters IT
date: 2024/01/01
references:
  - https://nvd.nist.gov/vuln/detail/CVE-2024-51752
logsource:
  category: application
  product: nextjs
detection:
  selection:
    EventID: 1
    Message|contains: "Refresh Token:"
  condition: selection
falsepositives:
  - Legitimate debugging sessions
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"WorkOS AuthKit Refresh Token Leak"; flow:to_server; content:"Refresh Token:"; http_client_body; classtype:attempted-recon; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade: Update @workos-inc/authkit-nextjs to version 0.13.2 or later.
    npm install @workos-inc/authkit-nextjs@latest
    
  2. Disable Debug Flag: Ensure the debug flag is set to false in all environments.
  3. Rotate Tokens: Rotate all refresh tokens that may have been exposed.
  4. Review Logs: Check existing logs for any leaked refresh tokens and take appropriate action.

Long-Term Measures:

  • Implement a policy to never enable debug flags in production.
  • Use centralized logging with sensitive data redaction.
  • Regularly audit dependencies for known vulnerabilities.

Valters IT Signature: This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-51752/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.