Vulnerabilities in pkg:npm/basic-auth-connect

PACKAGE
Advisory Identifier: GHSA-7p89-p6hx-q4fw
Advisory Summary

CVE-2024-47178 is a HIGH (CVSS 7.5) basic-auth-connect's callback uses time unsafe vulnerability (CWE-208: Observable Timing Discrepancy) affecting Basic auth connect libraries in the npm ecosystem. The issue involves basic-auth-connect's callback uses time unsafe string comparison. Remediation is available by upgrading affected packages to version 1.1.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/basic-auth-connect

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/basic-auth-connect. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-7p89-p6hx-q4fw CVE-2024-47178 HIGH basic-auth-connect's callback uses time unsafe string comparison

CVE-2024-47178 at a Glance

CVE Identifier CVE-2024-47178
GHSA Identifier GHSA-7p89-p6hx-q4fw
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-208: Observable Timing Discrepancy
Affected Product Basic auth connect
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2024-47178

To remediate this vulnerability, upgrade all affected Basic auth connect dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

basic-auth-connect fixed: 1.1.0
npm install basic-auth-connect@1.1.0
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 basic-auth-connect

How to Check if You Are Affected

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

npm ls basic-auth-connect

Analyze the terminal output to locate any version of Basic auth connect in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.0), your application is affected.

Note: The npm ls basic-auth-connect 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-208: Observable Timing Discrepancy, where two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not. In Basic auth connect, 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 basic-auth-connect <1.1.0 uses a timing-unsafe equality comparison that can leak timing information ### Patches this issue has been fixed in basic-auth-connect 1.1.0 ### References

CVE-2024-47178 Affected Basic auth connect Versions

1 component(s)
Fixed Versions:
1.1.0
Product / Package Ecosystem Affected Versions Fixed Version
basic-auth-connect
npm
< 1.1.0
1.1.0

References

Frequently Asked Questions

What is CVE-2024-47178?
CVE-2024-47178 is a security vulnerability in Basic auth connect involving basic-auth-connect's callback uses time unsafe string comparison under CWE-208: Observable Timing Discrepancy.
Which Basic auth connect versions are affected?
Affected versions include releases prior to 1.1.0 across affected packages: basic-auth-connect.
What version fixes CVE-2024-47178?
Upgrading to 1.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is basic-auth-connect affected?
Yes, basic-auth-connect is affected in releases prior to 1.1.0. Upgrade your dependency to 1.1.0 or later.
What is the CVSS score of CVE-2024-47178?
CVE-2024-47178 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2024-47178?
CVE-2024-47178 is classified under CWE-208: Observable Timing Discrepancy (Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not.).
How can I check npm dependencies for CVE-2024-47178?
Run the dependency tree command: 'npm ls basic-auth-connect'. 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-7p89-p6hx-q4fw",
  "modified" : "2024-09-30T20:11:40Z",
  "published" : "2024-09-30T17:48:29Z",
  "aliases" : [ "CVE-2024-47178" ],
  "summary" : "basic-auth-connect's callback uses time unsafe string comparison",
  "details" : "### Impact\n\nbasic-auth-connect <1.1.0 uses a timing-unsafe equality comparison that can leak timing information\n\n### Patches\n\nthis issue has been fixed in basic-auth-connect 1.1.0\n\n### References\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "basic-auth-connect"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/expressjs/basic-auth-connect/security/advisories/GHSA-7p89-p6hx-q4fw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-47178"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/expressjs/basic-auth-connect/commit/bac1e6a8530e1efd0028800b9b588a37adb0d203"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/expressjs/basic-auth-connect"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-208" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-30T17:48:29Z",
    "nvd_published_at" : "2024-09-30T16:15:09Z"
  }
}