{"id":"CVE-2026-27837","aliases":["CVE-2026-27837","GHSA-r5mx-6wc6-7h9w"],"related":[],"kind":"vulnerability","state":"published","title":"Dottie vulnerable to prototype pollution bypass via non-first path segments in set() and transform()","summary":"Dottie provides nested object access and manipulation in JavaScript. 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. Version 2.0.7 contains an updated fix to address the residual vulnerability.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Dottie provides nested object access and manipulation in JavaScript. 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. Version 2.0.7 contains an updated fix to address the residual vulnerability.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Dottie proporciona acceso y manipulación de objetos anidados en JavaScript. Las versiones 2.0.4 a 2.0.6 contienen una corrección incompleta para CVE-2023-26132. La protección contra la contaminación de prototipos introducida en el commit '7d3aee1' solo valida el primer segmento de una ruta separada por puntos, permitiendo a un atacante eludir la protección colocando '__proto__' en cualquier posición que no sea la primera. Tanto 'dottie.set()' como 'dottie.transform()' se ven afectados. La versión 2.0.7 contiene una corrección actualizada para abordar la vulnerabilidad residual.","source":"nvd"}],"published":"2026-02-26T00:19:24.289Z","modified":"2026-06-17T10:27:46.133Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L","score":6.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-1321"],"affected":[{"ranges":[{"version":">= 2.0.4, < 2.0.7","status":"affected"}],"vendor":"mickhansen","product":"dottie.js","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.4","status":"affected","fixed":"2.0.7"}],"ecosystem":"npm","package":"dottie","purl":"pkg:npm/dottie","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.0.4","fixed":"2.0.7"}],"vendor":"dottie_project","product":"dottie","cpe":"cpe:2.3:a:dottie_project:dottie:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/mickhansen/dottie.js/security/advisories/GHSA-r5mx-6wc6-7h9w","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/mickhansen/dottie.js/commit/7e8fa1345a4b46325f0eab8d7aeb1c4deaefdb14","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/advisories/GHSA-4gxf-g5gf-22h4","tags":["advisory","not-applicable","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27837","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/mickhansen/dottie.js","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-02-26T14:40:01.145Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-27837","url":"https://www.cve.org/CVERecord?id=CVE-2026-27837","licence":"CVE Terms of Use","modified":"2026-02-26T14:40:07.451Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-r5mx-6wc6-7h9w","url":"https://github.com/advisories/GHSA-r5mx-6wc6-7h9w","licence":"CC-BY-4.0","modified":"2026-02-26T22:11:18.547Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-27837","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27837","licence":"Public domain","modified":"2026-06-17T10:27:46.133Z"}],"updatedAt":"2026-11-25T22:59:14.926Z","epss":{"score":0.0037,"percentile":0.33012,"date":"2026-12-01T12:00:22.000Z"}}