CVE-2019-19729: bson-objectid contains Improper input validation
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.45518%
CWE
Published
5/24/2022
Updated
9/26/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
bson-objectid | npm | <= 1.3.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the ObjectID constructor's control flow that prioritizes checking for '_bsontype' property over proper input validation. When user input contains '_bsontype: "ObjectID"', the function returns the input without performing full validation (CWE-670). This allows attackers to inject arbitrary properties (CWE-20). The constructor is the primary entry point for object creation, making it the clear vulnerable function based on the advisory's description of the early return mechanism.