CVE-2024-41962: Bostr Bostr Improper Authorization Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-5cf7-cxrf-mq73
CVSS 4.6
CWE-285
Published
Advisory Summary

CVE-2024-41962 is a MODERATE (CVSS 4.6) bostr improper authorization vulnerability vulnerability (CWE-285: Improper Authorization) affecting Bostr libraries in the npm ecosystem. The issue involves bostr improper authorization vulnerability. Remediation is available by upgrading affected packages to version 3.0.10.

CVE-2024-41962 at a Glance

CVE Identifier CVE-2024-41962
GHSA Identifier GHSA-5cf7-cxrf-mq73
Severity MODERATE
CVSS v3.1 Base Score 4.6
CWE Classification CWE-285: Improper Authorization
Affected Product Bostr
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 4.6

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

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

How to Fix CVE-2024-41962

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

bostr fixed: 3.0.10
npm install bostr@3.0.10
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 bostr

How to Check if You Are Affected

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

npm ls bostr

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

Note: The npm ls bostr 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-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. In Bostr, 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

Even with `authorized_keys` is filled with allowed pubkeys, If `noscraper` is enabled, It will allow anyone to use bouncer even it's pubkey is not in `authorized_keys`. ### Impact - Private bouncer ### Patches Available on version [3.0.10](https://github.com/Yonle/bostr/releases/tag/3.0.10) ### Workarounds Disable `noscraper` if you have `authorized_keys` being set in config ### References This [line of code](https://github.com/Yonle/bostr/blob/8665374a66e2afb9f92d0414b0d6f420a95d5d2d/auth.js#L21) is the cause.

CVE-2024-41962 Affected Bostr Versions

1 component(s)
Fixed Versions:
3.0.10
Product / Package Ecosystem Affected Versions Fixed Version
bostr
npm
< 3.0.10
3.0.10

References

Frequently Asked Questions

What is CVE-2024-41962?
CVE-2024-41962 is a security vulnerability in Bostr involving Bostr Improper Authorization vulnerability under CWE-285: Improper Authorization.
Which Bostr versions are affected?
Affected versions include releases prior to 3.0.10 across affected packages: bostr.
What version fixes CVE-2024-41962?
Upgrading to 3.0.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bostr affected?
Yes, bostr is affected in releases prior to 3.0.10. Upgrade your dependency to 3.0.10 or later.
What is the CVSS score of CVE-2024-41962?
CVE-2024-41962 has a CVSS v3.1 base score of 4.6 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L.
What CWE is associated with CVE-2024-41962?
CVE-2024-41962 is classified under CWE-285: Improper Authorization (The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.).
How can I check npm dependencies for CVE-2024-41962?
Run the dependency tree command: 'npm ls bostr'. 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-5cf7-cxrf-mq73",
  "modified" : "2024-08-02T16:02:10Z",
  "published" : "2024-08-02T01:20:13Z",
  "aliases" : [ "CVE-2024-41962" ],
  "summary" : "Bostr Improper Authorization vulnerability",
  "details" : "Even with `authorized_keys` is filled with allowed pubkeys, If `noscraper` is enabled, It will allow anyone to use bouncer even it's pubkey is not in `authorized_keys`.\n\n### Impact\n- Private bouncer\n\n### Patches\nAvailable on version [3.0.10](https://github.com/Yonle/bostr/releases/tag/3.0.10)\n\n### Workarounds\nDisable `noscraper` if you have `authorized_keys` being set in config\n\n### References\nThis [line of code](https://github.com/Yonle/bostr/blob/8665374a66e2afb9f92d0414b0d6f420a95d5d2d/auth.js#L21) is the cause.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "bostr"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Yonle/bostr/security/advisories/GHSA-5cf7-cxrf-mq73"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-41962"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Yonle/bostr/commit/49181f4ec9ae1472c6675cab56bbc01e723855af"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Yonle/bostr"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Yonle/bostr/blob/8665374a66e2afb9f92d0414b0d6f420a95d5d2d/auth.js#L21"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Yonle/bostr/releases/tag/3.0.10"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-285" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-02T01:20:13Z",
    "nvd_published_at" : "2024-08-01T17:16:09Z"
  }
}