CVE-2024-51752: @workos inc/authkit nextjs @workos-inc/authkit-nextjs Refresh Tokens Are Logged Vulnerability

LOW
Advisory Identifier: GHSA-5wmg-9cvh-qw25
CWE-532
Published
Advisory Summary

CVE-2024-51752 is a LOW @workos-inc/authkit-nextjs refresh tokens are logged vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting @workos inc/authkit nextjs libraries in the npm ecosystem. The issue involves @workos-inc/authkit-nextjs refresh tokens are logged when the debug flag is enabled. Remediation is available by upgrading affected packages to version 0.13.2.

CVE-2024-51752 at a Glance

CVE Identifier CVE-2024-51752
GHSA Identifier GHSA-5wmg-9cvh-qw25
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-532: Insertion of Sensitive Information into Log File
Affected Product @workos inc/authkit nextjs
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2024-51752

To remediate this vulnerability, upgrade all affected @workos inc/authkit nextjs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@workos-inc/authkit-nextjs fixed: 0.13.2
npm install @workos-inc/authkit-nextjs@0.13.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @workos-inc/authkit-nextjs

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2024-51752, inspect your project dependencies using npm:

npm ls @workos-inc/authkit-nextjs

Analyze the terminal output to locate any version of @workos inc/authkit nextjs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.13.2), your application is affected.

Note: The npm ls @workos-inc/authkit-nextjs command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. In @workos inc/authkit nextjs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Refresh tokens are logged to the console when the disabled by default `debug` flag, is enabled. ### Patches Patched in [https://github.com/workos/authkit-nextjs/releases/tag/v0.13.2](https://github.com/workos/authkit-nextjs/releases/tag/v0.13.2)

CVE-2024-51752 Affected @workos inc/authkit nextjs Versions

1 component(s)
Fixed Versions:
0.13.2
Product / Package Ecosystem Affected Versions Fixed Version
@workos-inc/authkit-nextjs
npm
< 0.13.2
0.13.2

References

Frequently Asked Questions

What is CVE-2024-51752?
CVE-2024-51752 is a security vulnerability in @workos inc/authkit nextjs involving @workos-inc/authkit-nextjs refresh tokens are logged when the debug flag is enabled under CWE-532: Insertion of Sensitive Information into Log File.
Which @workos inc/authkit nextjs versions are affected?
Affected versions include releases prior to 0.13.2 across affected packages: @workos-inc/authkit-nextjs.
What version fixes CVE-2024-51752?
Upgrading to 0.13.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @workos-inc/authkit-nextjs affected?
Yes, @workos-inc/authkit-nextjs is affected in releases prior to 0.13.2. Upgrade your dependency to 0.13.2 or later.
What CWE is associated with CVE-2024-51752?
CVE-2024-51752 is classified under CWE-532: Insertion of Sensitive Information into Log File (The product writes sensitive information to a log file.).
How can I check npm dependencies for CVE-2024-51752?
Run the dependency tree command: 'npm ls @workos-inc/authkit-nextjs'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5wmg-9cvh-qw25",
  "modified" : "2024-11-05T21:37:24Z",
  "published" : "2024-11-05T17:34:23Z",
  "aliases" : [ "CVE-2024-51752" ],
  "summary" : "@workos-inc/authkit-nextjs refresh tokens are logged when the debug flag is enabled",
  "details" : "### Impact\nRefresh tokens are logged to the console when the disabled by default `debug` flag, is enabled.\n\n### Patches\nPatched in [https://github.com/workos/authkit-nextjs/releases/tag/v0.13.2](https://github.com/workos/authkit-nextjs/releases/tag/v0.13.2)\n",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@workos-inc/authkit-nextjs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.13.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/workos/authkit-nextjs/security/advisories/GHSA-5wmg-9cvh-qw25"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-51752"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/workos/authkit-nextjs/commit/15a332632f7560b03cc6d8cc8da24fd2ac931da7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/workos/authkit-nextjs"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/workos/authkit-nextjs/releases/tag/v0.13.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-532" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-05T17:34:23Z",
    "nvd_published_at" : "2024-11-05T20:15:15Z"
  }
}