{"id":"GHSA-442j-39wm-28r2","aliases":["CLSA-2026-1782349135","CLSA-2026-1782435546","CLSA-2026-1784596337","CLSA-2026-1792139237","CLSA-2026-1795526363","DHI-fh4s-zoih-tev7-rfyr"],"status":"published","title":"Handlebars.js has a Property Access Validation Bypass in container.lookup","description":"## Summary\n\nIn `lib/handlebars/runtime.js`, the `container.lookup()` function uses `container.lookupProperty()` as a gate check to enforce prototype-access controls, but then discards the validated result and performs a second, unguarded property access (`depths[i][name]`). This Time-of-Check Time-of-Use (TOCTOU) pattern means the security check and the actual read are decoupled, and the raw access bypasses any sanitization that `lookupProperty` may perform.\n\nOnly relevant when the **compat** compile option is enabled (`{compat: true}`), which activates `depthedLookup` in `lib/handlebars/compiler/javascript-compiler.js`.\n\n## Description\n\nThe vulnerable code in `lib/handlebars/runtime.js` (lines 137–144):\n\n```javascript\nlookup: function (depths, name) {\n  const len = depths.length;\n  for (let i = 0; i \u003c len; i++) {\n    let result = depths[i] \u0026\u0026 container.lookupProperty(depths[i], name);\n    if (result != null) {\n      return depths[i][name];  // BUG: should be `return result;`\n    }\n  }\n},\n```\n\n`container.lookupProperty()` (lines 119–136) enforces `hasOwnProperty` checks and `resultIsAllowed()` prototype-access controls. However, `container.lookup()` only uses `lookupProperty` as a boolean gate — if the gate passes (`result != null`), it then performs an independent, raw `depths[i][name]` access that circumvents any transformation or wrapped value that `lookupProperty` may have returned.\n\n## Workarounds\n\n- Avoid enabling `{ compat: true }` when rendering templates that include untrusted data.\n- Ensure context data objects are plain JSON (no Proxies, no getter-based accessor properties).","severity":{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"low","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-367"],"published":"2026-03-29T15:16:37Z","modified":"2026-12-05T03:13:12Z","fixes":[{"ecosystem":"npm","package":"handlebars","fixed_in":["4.7.9"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"handlebars","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.0"},{"last_affected":"4.7.8"},{"fixed":"4.7.9"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"handlebars","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.7.7-tuxcare.0"},{"fixed":"4.7.7-tuxcare.1"}]}],"versions":["4.7.7"],"bundled":8},{"source":"osv","ecosystem":"TuxCare:npm","package":"handlebars","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.7.8-tuxcare.0"},{"fixed":"4.7.8-tuxcare.1"}]}],"versions":["4.7.8"],"bundled":8},{"source":"osv","ecosystem":"TuxCare:npm","package":"handlebars","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.8-tuxcare.0"},{"fixed":"3.0.8-tuxcare.1"}]}],"versions":["3.0.8"],"bundled":3},{"source":"osv","ecosystem":"TuxCare:npm","package":"handlebars","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.5.3-tuxcare.0"},{"fixed":"4.5.3-tuxcare.3"}]}],"versions":["4.5.3","4.5.3-tuxcare.1","4.5.3-tuxcare.2"],"bundled":7},{"source":"osv","ecosystem":"TuxCare:npm","package":"handlebars","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.11-tuxcare.0"},{"fixed":"4.0.11-tuxcare.1"}]}],"versions":["4.0.11"],"bundled":20},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.23","package":"jupyterhub-k8s-singleuser-sample-fips","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.4.5-r0"}]}],"versions":["4.4.5-r0","4.4.5-r1","4.4.5-r2","4.4.5-r3","4.4.5-r4","4.4.5-r5"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"jupyterhub-k8s-singleuser-sample-fips","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.4.5-r0"}]}],"versions":["4.4.5-r0","4.4.5-r1","4.4.5-r2","4.4.5-r3","4.4.5-r4","4.4.5-r5"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.23","package":"jupyterhub-k8s-singleuser-sample","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.4.5-r0"}]}],"versions":["4.4.5-r0","4.4.5-r1","4.4.5-r2","4.4.5-r3","4.4.5-r4","4.4.5-r5"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"jupyterhub-k8s-singleuser-sample","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.4.5-r0"}]}],"versions":["4.4.5-r0","4.4.5-r1","4.4.5-r2","4.4.5-r3","4.4.5-r4","4.4.5-r5"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"datahub-ingestion","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.5.0.7-0"}]}],"versions":["1.5.0.7-0","1.6.0.1-0","1.6.0.1-1","1.6.0.1-2","1.6.0.1-3","1.6.0.2-0","1.6.0.2-1","1.7.0.10-0","1.7.0.12-0","1.7.0.13-0","1.7.0.14-0","1.7.0.14-1","1.7.0.14-2","1.7.0.16-0","1.7.0.16-1","1.7.0.17-0","1.7.0.17-1","1.7.0.17-2","1.7.0.17-3","1.7.0.18-0","1.7.0.19-0","1.7.0.19-1","1.7.0.19-2","1.7.0.19-3","1.7.0.19-4","1.7.0.19-5","1.7.0.19-6","1.7.0.20-10","1.7.0.20-6","1.7.0.20-7","1.7.0.20-8","1.7.0.20-9","1.9.0.1-10","1.9.0.1-11","1.9.0.1-12","1.9.0.1-13","1.9.0.1-14","1.9.0.2-14","1.9.0.2-15","1.9.0.3-15"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"jupyterhub-k8s-singleuser-sample-fips","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.4.5-0"}]}],"versions":["4.4.5-0","4.4.5-1","4.4.5-2","4.4.5-3","4.4.5-4","4.4.5-5","4.4.5-6"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"jupyterhub-k8s-singleuser-sample","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.4.5-0"}]}],"versions":["4.4.5-0","4.4.5-1","4.4.5-2","4.4.5-3","4.4.5-4","4.4.5-5","4.4.5-6"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"superset","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.1.0-0"}]}],"versions":["6.1.0-0","6.1.0-1","6.1.0-10","6.1.0-11","6.1.0-12","6.1.0-13","6.1.0-14","6.1.0-15","6.1.0-16","6.1.0-17","6.1.0-18","6.1.0-19","6.1.0-2","6.1.0-20","6.1.0-21","6.1.0-22","6.1.0-23","6.1.0-24","6.1.0-25","6.1.0-26","6.1.0-27","6.1.0-28","6.1.0-29","6.1.0-3","6.1.0-30","6.1.0-31","6.1.0-32","6.1.0-33","6.1.0-34","6.1.0-35","6.1.0-36","6.1.0-37","6.1.0-38","6.1.0-39","6.1.0-4","6.1.0-40","6.1.0-41","6.1.0-42","6.1.0-43","6.1.0-44","6.1.0-45","6.1.0-46","6.1.0-5","6.1.0-6","6.1.0-7","6.1.0-8","6.1.0-9"]},{"source":"osv","ecosystem":"npm","package":"handlebars","ranges":[{"type":"SEMVER","events":[{"introduced":"4.0.0"},{"fixed":"4.7.9"}]}]}],"references":[{"url":"https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-442j-39wm-28r2","tags":["advisory","web"]},{"url":"https://github.com/handlebars-lang/handlebars.js/commit/68d8df5a88e0a26fe9e6084c5c6aaebe67b07da2","tags":["fix","web"]},{"url":"https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.9","tags":["web"]},{"url":"https://github.com/advisories/GHSA-442j-39wm-28r2","tags":["advisory"]},{"url":"https://scout.docker.com/v/DHI-fh4s-zoih-tev7-rfyr","tags":["advisory"]},{"url":"https://github.com/handlebars-lang/handlebars.js","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-442j-39wm-28r2","title":"Handlebars.js has a Property Access Validation Bypass in container.lookup","description":"## Summary\n\nIn `lib/handlebars/runtime.js`, the `container.lookup()` function uses `container.lookupProperty()` as a gate check to enforce prototype-access controls, but then discards the validated result and performs a second, unguarded property access (`depths[i][name]`). This Time-of-Check Time-of-Use (TOCTOU) pattern means the security check and the actual read are decoupled, and the raw access bypasses any sanitization that `lookupProperty` may perform.\n\nOnly relevant when the **compat** compile option is enabled (`{compat: true}`), which activates `depthedLookup` in `lib/handlebars/compiler/javascript-compiler.js`.\n\n## Description\n\nThe vulnerable code in `lib/handlebars/runtime.js` (lines 137–144):\n\n```javascript\nlookup: function (depths, name) {\n  const len = depths.length;\n  for (let i = 0; i \u003c len; i++) {\n    let result = depths[i] \u0026\u0026 container.lookupProperty(depths[i], name);\n    if (result != null) {\n      return depths[i][name];  // BUG: should be `return result;`\n    }\n  }\n},\n```\n\n`container.lookupProperty()` (lines 119–136) enforces `hasOwnProperty` checks and `resultIsAllowed()` prototype-access controls. However, `container.lookup()` only uses `lookupProperty` as a boolean gate — if the gate passes (`result != null`), it then performs an independent, raw `depths[i][name]` access that circumvents any transformation or wrapped value that `lookupProperty` may have returned.\n\n## Workarounds\n\n- Avoid enabling `{ compat: true }` when rendering templates that include untrusted data.\n- Ensure context data objects are plain JSON (no Proxies, no getter-based accessor properties).","status":"published","published":"2026-03-29T15:16:37Z","modified":"2026-03-29T15:16:37Z","cvss":[{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"low"}],"cwes":["CWE-367"],"updated_at":"2026-11-02T14:39:44.97342Z"}],"osv":[{"id":"DHI-fh4s-zoih-tev7-rfyr","upstream":["GHSA-442j-39wm-28r2"],"title":"## Summary","description":"## Summary\n\nIn `lib/handlebars/runtime.js`, the `container.lookup()` function uses `container.lookupProperty()` as a gate check to enforce prototype-access controls, but then discards the validated result and performs a second, unguarded property access (`depths[i][name]`). This Time-of-Check Time-of-Use (TOCTOU) pattern means the security check and the actual read are decoupled, and the raw access bypasses any sanitization that `lookupProperty` may perform.\n\nOnly relevant when the **compat** compile option is enabled (`{compat: true}`), which activates `depthedLookup` in `lib/handlebars/compiler/javascript-compiler.js`.\n\n## Description\n\nThe vulnerable code in `lib/handlebars/runtime.js` (lines 137–144):\n\n```javascript\nlookup: function (depths, name) {\n  const len = depths.length;\n  for (let i = 0; i \u003c len; i++) {\n    let result = depths[i] \u0026\u0026 container.lookupProperty(depths[i], name);\n    if (result != null) {\n      return depths[i][name];  // BUG: should be `return result;`\n    }\n  }\n},\n```\n\n`container.lookupProperty()` (lines 119–136) enforces `hasOwnProperty` checks and `resultIsAllowed()` prototype-access controls. However, `container.lookup()` only uses `lookupProperty` as a boolean gate — if the gate passes (`result != null`), it then performs an independent, raw `depths[i][name]` access that circumvents any transformation or wrapped value that `lookupProperty` may have returned.\n\n## Workarounds\n\n- Avoid enabling `{ compat: true }` when rendering templates that include untrusted data.\n- Ensure context data objects are plain JSON (no Proxies, no getter-based accessor properties).","status":"published","published":"2026-11-14T00:31:57Z","modified":"2026-12-04T02:15:32.933048689Z","cvss":[{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"low"}],"updated_at":"2026-12-04T02:21:28.919339Z"},{"id":"GHSA-442j-39wm-28r2","title":"Handlebars.js has a Property Access Validation Bypass in container.lookup","description":"## Summary\n\nIn `lib/handlebars/runtime.js`, the `container.lookup()` function uses `container.lookupProperty()` as a gate check to enforce prototype-access controls, but then discards the validated result and performs a second, unguarded property access (`depths[i][name]`). This Time-of-Check Time-of-Use (TOCTOU) pattern means the security check and the actual read are decoupled, and the raw access bypasses any sanitization that `lookupProperty` may perform.\n\nOnly relevant when the **compat** compile option is enabled (`{compat: true}`), which activates `depthedLookup` in `lib/handlebars/compiler/javascript-compiler.js`.\n\n## Description\n\nThe vulnerable code in `lib/handlebars/runtime.js` (lines 137–144):\n\n```javascript\nlookup: function (depths, name) {\n  const len = depths.length;\n  for (let i = 0; i \u003c len; i++) {\n    let result = depths[i] \u0026\u0026 container.lookupProperty(depths[i], name);\n    if (result != null) {\n      return depths[i][name];  // BUG: should be `return result;`\n    }\n  }\n},\n```\n\n`container.lookupProperty()` (lines 119–136) enforces `hasOwnProperty` checks and `resultIsAllowed()` prototype-access controls. However, `container.lookup()` only uses `lookupProperty` as a boolean gate — if the gate passes (`result != null`), it then performs an independent, raw `depths[i][name]` access that circumvents any transformation or wrapped value that `lookupProperty` may have returned.\n\n## Workarounds\n\n- Avoid enabling `{ compat: true }` when rendering templates that include untrusted data.\n- Ensure context data objects are plain JSON (no Proxies, no getter-based accessor properties).","status":"published","published":"2026-03-29T15:16:37Z","modified":"2026-09-10T03:50:36.874716263Z","cvss":[{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"low"}],"cwes":["CWE-367"],"updated_at":"2026-11-02T15:46:36.434231Z"},{"id":"CLSA-2026-1782349135","title":"TuxCare security update for handlebars (8 CVEs)","description":"TuxCare rebuilt handlebars to address 8 CVEs. Fixed in 4.7.7-tuxcare.1.","status":"published","published":"2026-08-04T14:52:39Z","modified":"2026-10-15T09:47:10.129115848Z","updated_at":"2026-11-02T15:43:45.794021Z"},{"id":"CLSA-2026-1782435546","title":"TuxCare security update for handlebars (8 CVEs)","description":"TuxCare rebuilt handlebars to address 8 CVEs. Fixed in 4.7.8-tuxcare.1.","status":"published","published":"2026-08-04T14:52:39Z","modified":"2026-10-15T09:47:10.153121357Z","updated_at":"2026-11-02T15:43:45.794021Z"},{"id":"CLSA-2026-1784596337","title":"TuxCare security update for handlebars (3 CVEs)","description":"TuxCare rebuilt handlebars to address 3 CVEs. Fixed in 3.0.8-tuxcare.1.","status":"published","published":"2026-08-04T14:52:45Z","modified":"2026-10-15T09:47:36.233368352Z","updated_at":"2026-11-02T15:43:46.482572Z"},{"id":"CLSA-2026-1792139237","title":"TuxCare security update for handlebars (7 CVEs)","description":"TuxCare rebuilt handlebars to address 7 CVEs. Fixed in 4.5.3-tuxcare.3.","status":"published","published":"2026-10-16T08:27:17Z","modified":"2026-10-16T12:15:03.193874365Z","updated_at":"2026-11-02T15:43:50.949147Z"},{"id":"CLSA-2026-1795526363","upstream":["CVE-2019-19919","CVE-2019-20920","CVE-2019-20922","CVE-2021-23369","CVE-2021-23383","CVE-2026-106444","CVE-2026-106445","CVE-2026-106446","CVE-2026-33916","CVE-2026-33937","CVE-2026-33938","CVE-2026-33939","CVE-2026-33940","CVE-2026-33941","GHSA-2cf5-4w76-r9qv","GHSA-442j-39wm-28r2","GHSA-f52g-6jhx-586p","GHSA-g9r4-xpmj-mj65","GHSA-q2c6-c6pm-g3gh","GHSA-q42p-pg8m-cqh6"],"title":"TuxCare security update for handlebars (20 CVEs)","description":"TuxCare rebuilt handlebars to address 20 CVEs. Fixed in 4.0.11-tuxcare.1.","status":"published","published":"2026-11-24T14:19:24Z","modified":"2026-12-05T03:13:12.428347235Z","updated_at":"2026-12-05T03:43:37.124277Z"}]}}
