Vulnerabilities in pkg:npm/dottie

PACKAGE
Advisory Identifier: GHSA-r5mx-6wc6-7h9w
Advisory Summary

CVE-2026-27837 is a MODERATE (CVSS 6.3) dottie is vulnerable to prototype vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Dottie libraries in the npm ecosystem. The issue involves dottie is vulnerable to prototype pollution bypass via non-first path segments in set() and transform(). Remediation is available by upgrading affected packages to version 2.0.7.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/dottie

2 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-r5mx-6wc6-7h9w CVE-2026-27837 MODERATE dottie is vulnerable to Prototype Pollution bypass via non-first path segments in set() and transform()
GHSA-4gxf-g5gf-22h4 CVE-2023-26132 HIGH dottie vulnerable to Prototype Pollution

CVE-2026-27837 at a Glance

CVE Identifier CVE-2026-27837
GHSA Identifier GHSA-r5mx-6wc6-7h9w
Severity MODERATE
CVSS v3.1 Base Score 6.3
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Dottie
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.3

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:R/S:U/C:L/I:L/A:L).

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

How to Fix CVE-2026-27837

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

dottie fixed: 2.0.7
npm install dottie@2.0.7
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 dottie

How to Check if You Are Affected

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

npm ls dottie

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

Note: The npm ls dottie 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-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Dottie, 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

### Summary dottie versions 2.0.4 through 2.0.6 contain an incomplete fix for CVE-2023-26132. The prototype pollution guard introduced in commit `7d3aee1` only validates the first segment of a dot-separated path, allowing an attacker to bypass the protection by placing `__proto__` at any position other than the first. Both `dottie.set()` and `dottie.transform()` are affected. ### Details The existing guard checks only `pieces[0] === '__proto__'`. When a path like `'a.__proto__.polluted'` is used, `pieces[0]` evaluates to `'a'`, not `'__proto__'`, so the guard is bypassed. Inside the traversal loop, `current['__proto__'] = {}` triggers the `__proto__` setter, replacing the intermediate object's prototype. The final value is then written onto this new prototype. **Important distinction:** This vulnerability does NOT pollute the global `Object.prototype`. It injects properties into a specific object's prototype chain. However, injected properties are invisible to `hasOwnProperty()` and `Object.keys()`, which makes them difficult to detect and can lead to authorization bypass in common coding patterns. ### PoC ```javascript const dottie = require('dottie'); // set() bypass const obj = {}; dottie.set(obj, 'session.__proto__.isAdmin', true); console.log(obj.session.isAdmin); // true console.log(({}).isAdmin); // undefined console.log(obj.session.hasOwnProperty('isAdmin')); // false // transform() bypass const flat = { 'user.__proto__.role': 'admin', 'user.name': 'guest' }; const result = dottie.transform(flat); console.log(result.user.role); // 'admin' console.log(({}).role); // undefined ``` Tested on Node.js v20 and v22, dottie 2.0.6, Windows 11. ### Impact The primary risk is authorization bypass. In a typical server-side scenario where dottie is used to process user input (e.g., via Sequelize, which depends on dottie with ~1.3M weekly npm downloads), an attacker can inject properties like `isAdmin: true` into objects used for access control decisions. Since the injected property is not an own property, standard checks using `hasOwnProperty()` or `Object.keys()` will not reveal it, while property access like `if (session.isAdmin)` will return `true`. Additionally, replacing an object's prototype via `current['__proto__'] = {}` strips all inherited methods, potentially causing TypeError exceptions and denial of service.

CVE-2026-27837 Affected Dottie Versions

1 component(s)
Fixed Versions:
2.0.7
Product / Package Ecosystem Affected Versions Fixed Version
dottie
npm
≥ 2.0.4
< 2.0.7
2.0.7

References

Frequently Asked Questions

What is CVE-2026-27837?
CVE-2026-27837 is a security vulnerability in Dottie involving dottie is vulnerable to Prototype Pollution bypass via non-first path segments in set() and transform() under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Dottie versions are affected?
Affected versions include releases prior to 2.0.7 across affected packages: dottie.
What version fixes CVE-2026-27837?
Upgrading to 2.0.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is dottie affected?
Yes, dottie is affected in releases prior to 2.0.7. Upgrade your dependency to 2.0.7 or later.
What is the CVSS score of CVE-2026-27837?
CVE-2026-27837 has a CVSS v3.1 base score of 6.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2026-27837?
CVE-2026-27837 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.).
How can I check npm dependencies for CVE-2026-27837?
Run the dependency tree command: 'npm ls dottie'. 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-r5mx-6wc6-7h9w",
  "modified" : "2026-02-26T19:54:34Z",
  "published" : "2026-02-26T19:54:34Z",
  "aliases" : [ "CVE-2026-27837" ],
  "summary" : "dottie is vulnerable to Prototype Pollution bypass via non-first path segments in set() and transform()",
  "details" : "### Summary\n\ndottie versions 2.0.4 through 2.0.6 contain an incomplete fix for CVE-2023-26132. The prototype pollution guard introduced in commit `7d3aee1` only validates the first segment of a dot-separated path, allowing an attacker to bypass the protection by placing `__proto__` at any position other than the first.\n\nBoth `dottie.set()` and `dottie.transform()` are affected.\n\n### Details\n\nThe existing guard checks only `pieces[0] === '__proto__'`. When a path like `'a.__proto__.polluted'` is used, `pieces[0]` evaluates to `'a'`, not `'__proto__'`, so the guard is bypassed.\n\nInside the traversal loop, `current['__proto__'] = {}` triggers the `__proto__` setter, replacing the intermediate object's prototype. The final value is then written onto this new prototype.\n\n**Important distinction:** This vulnerability does NOT pollute the global `Object.prototype`. It injects properties into a specific object's prototype chain. However, injected properties are invisible to `hasOwnProperty()` and `Object.keys()`, which makes them difficult to detect and can lead to authorization bypass in common coding patterns.\n\n### PoC\n```javascript\nconst dottie = require('dottie');\n\n// set() bypass\nconst obj = {};\ndottie.set(obj, 'session.__proto__.isAdmin', true);\nconsole.log(obj.session.isAdmin);                    // true\nconsole.log(({}).isAdmin);                           // undefined\nconsole.log(obj.session.hasOwnProperty('isAdmin'));  // false\n\n// transform() bypass\nconst flat = { 'user.__proto__.role': 'admin', 'user.name': 'guest' };\nconst result = dottie.transform(flat);\nconsole.log(result.user.role);                       // 'admin'\nconsole.log(({}).role);                              // undefined\n```\n\nTested on Node.js v20 and v22, dottie 2.0.6, Windows 11.\n\n### Impact\n\nThe primary risk is authorization bypass. In a typical server-side scenario where dottie is used to process user input (e.g., via Sequelize, which depends on dottie with ~1.3M weekly npm downloads), an attacker can inject properties like `isAdmin: true` into objects used for access control decisions. Since the injected property is not an own property, standard checks using `hasOwnProperty()` or `Object.keys()` will not reveal it, while property access like `if (session.isAdmin)` will return `true`.\n\nAdditionally, replacing an object's prototype via `current['__proto__'] = {}` strips all inherited methods, potentially causing TypeError exceptions and denial of service.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "dottie"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.4"
      }, {
        "fixed" : "2.0.7"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.0.6"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mickhansen/dottie.js/security/advisories/GHSA-r5mx-6wc6-7h9w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-27837"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mickhansen/dottie.js/commit/7e8fa1345a4b46325f0eab8d7aeb1c4deaefdb14"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-4gxf-g5gf-22h4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mickhansen/dottie.js"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-26T19:54:34Z",
    "nvd_published_at" : "2026-02-26T01:16:24Z"
  }
}