Vulnerabilities in pkg:npm/nteract

PACKAGE
Advisory Identifier: GHSA-6jvg-hp25-42f6
Advisory Summary

CVE-2024-22891 is a MODERATE remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Nteract libraries in the npm ecosystem. The issue involves nteract remote code execution vulnerability. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/nteract

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/nteract. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-6jvg-hp25-42f6 CVE-2024-22891 MODERATE Nteract Remote Code Execution vulnerability

CVE-2024-22891 at a Glance

CVE Identifier CVE-2024-22891
GHSA Identifier GHSA-6jvg-hp25-42f6
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Nteract
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2024-22891

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

nteract fixed: Latest secure release
npm install nteract@Latest secure release
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 nteract

How to Check if You Are Affected

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

npm ls nteract

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

Note: The npm ls nteract 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Nteract, 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

Nteract v.0.28.0 was discovered to contain a remote code execution (RCE) vulnerability via the Markdown link.

CVE-2024-22891 Affected Nteract Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
nteract
npm
≤ 0.28.0

References

Frequently Asked Questions

What is CVE-2024-22891?
CVE-2024-22891 is a security vulnerability in Nteract involving Nteract Remote Code Execution vulnerability under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Nteract versions are affected?
Affected versions include releases prior to current release patches across affected packages: nteract.
What version fixes CVE-2024-22891?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is nteract affected?
Yes, nteract is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2024-22891?
CVE-2024-22891 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check npm dependencies for CVE-2024-22891?
Run the dependency tree command: 'npm ls nteract'. 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-6jvg-hp25-42f6",
  "modified" : "2024-03-01T16:57:12Z",
  "published" : "2024-03-01T06:33:06Z",
  "aliases" : [ "CVE-2024-22891" ],
  "summary" : "Nteract Remote Code Execution vulnerability",
  "details" : "Nteract v.0.28.0 was discovered to contain a remote code execution (RCE) vulnerability via the Markdown link.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "nteract"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.28.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-22891"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/EQSTLab/PoC/tree/main/2024/RCE/CVE-2024-22891"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nteract/nteract"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-01T16:57:12Z",
    "nvd_published_at" : "2024-03-01T06:15:48Z"
  }
}