Vulnerabilities in pkg:npm/react-native-document-picker

PACKAGE
Advisory Identifier: GHSA-pmgm-h3cc-m4hj
Advisory Summary

CVE-2024-25466 is a HIGH (CVSS 7.3) path traversal vulnerability (CWE-26: Path Traversal: '/dir/../filename') affecting React native document picker libraries in the npm ecosystem. The issue involves react native document picker directory traversal vulnerability. Remediation is available by upgrading affected packages to version 9.1.1, 8.2.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/react-native-document-picker

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/react-native-document-picker. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-pmgm-h3cc-m4hj CVE-2024-25466 HIGH React Native Document Picker Directory Traversal vulnerability

CVE-2024-25466 at a Glance

CVE Identifier CVE-2024-25466
GHSA Identifier GHSA-pmgm-h3cc-m4hj
Severity HIGH
CVSS v3.1 Base Score 7.3
CWE Classification CWE-26: Path Traversal: '/dir/../filename'
Affected Product React native document picker
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.3

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

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

How to Fix CVE-2024-25466

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

react-native-document-picker fixed: 9.1.1
npm install react-native-document-picker@9.1.1
react-native-document-picker fixed: 8.2.2
npm install react-native-document-picker@8.2.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 react-native-document-picker

How to Check if You Are Affected

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

npm ls react-native-document-picker

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

Note: The npm ls react-native-document-picker 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-26: Path Traversal: '/dir/../filename', where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize "/dir/../filename" sequences that can resolve to a location that is outside of that directory. In React native document picker, 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

Directory Traversal vulnerability in React Native Document Picker before 8.2.2 and 9.x before 9.1.1 allows a local attacker to execute arbitrary code via a crafted script to the Android library component.

CVE-2024-25466 Affected React native document picker Versions

2 component(s)
Fixed Versions:
9.1.18.2.2
Product / Package Ecosystem Affected Versions Fixed Version
react-native-document-picker
npm
≥ 9.0.0
< 9.1.1
9.1.1
react-native-document-picker
npm
< 8.2.2
8.2.2

References

Frequently Asked Questions

What is CVE-2024-25466?
CVE-2024-25466 is a security vulnerability in React native document picker involving React Native Document Picker Directory Traversal vulnerability under CWE-26: Path Traversal: '/dir/../filename'.
Which React native document picker versions are affected?
Affected versions include releases prior to 9.1.1, 8.2.2 across affected packages: react-native-document-picker.
What version fixes CVE-2024-25466?
Upgrading to 9.1.1, 8.2.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is react-native-document-picker affected?
Yes, react-native-document-picker is affected in releases prior to 9.1.1, 8.2.2. Upgrade your dependency to 9.1.1, 8.2.2 or later.
What is the CVSS score of CVE-2024-25466?
CVE-2024-25466 has a CVSS v3.1 base score of 7.3 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:H.
What CWE is associated with CVE-2024-25466?
CVE-2024-25466 is classified under CWE-26: Path Traversal: '/dir/../filename' (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize "/dir/../filename" sequences that can resolve to a location that is outside of that directory.).
How can I check npm dependencies for CVE-2024-25466?
Run the dependency tree command: 'npm ls react-native-document-picker'. 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-pmgm-h3cc-m4hj",
  "modified" : "2025-03-27T18:38:48Z",
  "published" : "2024-02-16T09:30:26Z",
  "aliases" : [ "CVE-2024-25466" ],
  "summary" : "React Native Document Picker Directory Traversal vulnerability",
  "details" : "Directory Traversal vulnerability in React Native Document Picker before 8.2.2 and 9.x before 9.1.1 allows a local attacker to execute arbitrary code via a crafted script to the Android library component.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "react-native-document-picker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.0.0"
      }, {
        "fixed" : "9.1.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "react-native-document-picker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "8.2.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-25466"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rnmods/react-native-document-picker/pull/698"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rnmods/react-native-document-picker/commit/1ae7cb217d23a551bff86ad10c7ae6f5e074490f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rnmods/react-native-document-picker/commit/ad0b5e58252eba56a5a3b22311a66ffa5e65cffe"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FixedOctocat/CVE-2024-25466/tree/main"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rnmods/react-native-document-picker"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rnmods/react-native-document-picker/blob/0be5a70c3b456e35c2454aaf4dc8c2d40eb2ab47/android/src/main/java/com/reactnativedocumentpicker/RNDocumentPickerModule.java"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rnmods/react-native-document-picker/releases/tag/v8.2.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-26" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-16T23:37:06Z",
    "nvd_published_at" : "2024-02-16T09:15:08Z"
  }
}