{"id":"CVE-2026-33938","revision":null,"records":[{"revision":"afcc36da4f254911880798122d63b4fd","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-33938","aliases":[],"title":"Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block","description":"Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, the `@partial-block` special variable is stored in the template data context and is reachable and mutable from within a template via helpers that accept arbitrary objects. When a helper overwrites `@partial-block` with a crafted Handlebars AST, a subsequent invocation of `{{> @partial-block}}` compiles and executes that AST, enabling arbitrary JavaScript execution on the server. Version 4.7.9 fixes the issue. Some workarounds are available. First, use the runtime-only build (`require('handlebars/runtime')`). The `compile()` method is  absent, eliminating the vulnerable fallback path. Second, audit registered helpers for any that write arbitrary values to context objects. Helpers  should treat context data as read-only. Third, avoid registering helpers from third-party packages (such as `handlebars-helpers`) in  contexts where templates or context data can be influenced by untrusted input.","state":0,"publishedAt":"2026-03-27T21:05:42.485+00:00","modifiedAt":"2026-09-04T12:04:55.157+00:00","affected":[{"ecosystem":"Vendor product","name":"handlebars.js","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"handlebars-lang\",\n                    \"product\": \"handlebars.js\",\n                    \"versions\": [\n                        {\n                            \"version\": \">= 4.0.0, < 4.7.9\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"severity":"HIGH"}],"references":["https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-3mfm-83xf-c92r","https://github.com/handlebars-lang/handlebars.js/commit/68d8df5a88e0a26fe9e6084c5c6aaebe67b07da2","https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.9"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-33938","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-33938","identifiers":["CVE-2026-33938"]},"retained":false,"historicalAffected":[]},{"revision":"4722280557fc45089c8df64b22a5c2e6","observedAt":"2026-11-01T06:04:58.961+00:00","statement":{"source":"euvd","id":"EUVD-2026-16849","aliases":["CVE-2026-33938","GHSA-3mfm-83xf-c92r"],"title":"Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, the `@partial-block` special variable is stored in the template data context and is reachable and mutable from within a template…","description":"Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, the `@partial-block` special variable is stored in the template data context and is reachable and mutable from within a template via helpers that accept arbitrary objects. When a helper overwrites `@partial-block` with a crafted Handlebars AST, a subsequent invocation of `{{> @partial-block}}` compiles and executes that AST, enabling arbitrary JavaScript execution on the server. Version 4.7.9 fixes the issue. Some workarounds are available. First, use the runtime-only build (`require('handlebars/runtime')`). The `compile()` method is  absent, eliminating the vulnerable fallback path. Second, audit registered helpers for any that write arbitrary values to context objects. Helpers  should treat context data as read-only. Third, avoid registering helpers from third-party packages (such as `handlebars-helpers`) in  contexts where templates or context data can be influenced by untrusted input.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"severity":null}],"references":["https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-3mfm-83xf-c92r","https://github.com/handlebars-lang/handlebars.js/commit/68d8df5a88e0a26fe9e6084c5c6aaebe67b07da2","https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.9"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-16849","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Mar 27, 2026, 9:05:42 PM","dateUpdated":"Sep 4, 2026, 12:04:55 PM"},"relatedAdvisories":[{"id":"RHSA-2026:10175","title":"Red Hat Security Advisory: Red Hat OpenShift Dev Spaces 3.27.1 Release.","vulnerabilityIds":["CVE-2025-61728","CVE-2025-62718","CVE-2026-2332","CVE-2026-4800","CVE-2026-4926","CVE-2026-22731","CVE-2026-25679","CVE-2026-26999","CVE-2026-27137","CVE-2026-27606","CVE-2026-29054","CVE-2026-32305","CVE-2026-32695","CVE-2026-33186","CVE-2026-33433","CVE-2026-33805","CVE-2026-33870","CVE-2026-33871","CVE-2026-33937","CVE-2026-33938","CVE-2026-33939","CVE-2026-33940","CVE-2026-33941","CVE-2026-34986","CVE-2026-40175"]},{"id":"msrc_CVE-2026-33938","title":"Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block","vulnerabilityIds":["CVE-2026-33938"]},{"id":"RHSA-2026:34342","title":"Red Hat Security Advisory: Cluster Observability Operator 1.5.0","vulnerabilityIds":["CVE-2020-7753","CVE-2021-33623","CVE-2024-4068","CVE-2024-45338","CVE-2024-52011","CVE-2025-22868","CVE-2025-22870","CVE-2025-22872","CVE-2025-47911","CVE-2025-58190","CVE-2026-1526","CVE-2026-1528","CVE-2026-2229","CVE-2026-4800","CVE-2026-4867","CVE-2026-6321","CVE-2026-6322","CVE-2026-6734","CVE-2026-9277","CVE-2026-9697","CVE-2026-12143","CVE-2026-12151","CVE-2026-25680","CVE-2026-25681","CVE-2026-29063","CVE-2026-32141","CVE-2026-33228","CVE-2026-33671","CVE-2026-33814","CVE-2026-33891","CVE-2026-33894","CVE-2026-33895","CVE-2026-33896","CVE-2026-33937","CVE-2026-33938","CVE-2026-33939","CVE-2026-33940","CVE-2026-33941","CVE-2026-39821","CVE-2026-42506","CVE-2026-48779"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-16849","identifiers":["EUVD-2026-16849","CVE-2026-33938","GHSA-3mfm-83xf-c92r"]},"retained":false,"historicalAffected":[]},{"revision":"fe42b2163749428e947d0e3f82e57171","observedAt":"2026-10-27T09:03:00.507+00:00","statement":{"source":"nvd","id":"CVE-2026-33938","aliases":[],"title":"Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, the `@partial-block` special variable is stored in the template data context and is reachable and mutable from within a template…","description":"Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, the `@partial-block` special variable is stored in the template data context and is reachable and mutable from within a template via helpers that accept arbitrary objects. When a helper overwrites `@partial-block` with a crafted Handlebars AST, a subsequent invocation of `{{> @partial-block}}` compiles and executes that AST, enabling arbitrary JavaScript execution on the server. Version 4.7.9 fixes the issue. Some workarounds are available. First, use the runtime-only build (`require('handlebars/runtime')`). The `compile()` method is  absent, eliminating the vulnerable fallback path. Second, audit registered helpers for any that write arbitrary values to context objects. Helpers  should treat context data as read-only. Third, avoid registering helpers from third-party packages (such as `handlebars-helpers`) in  contexts where templates or context data can be influenced by untrusted input.","state":0,"publishedAt":"2026-03-27T21:17:27.587+00:00","modifiedAt":"2026-10-26T22:10:00.163+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"severity":"HIGH"},{"system":"CVSS 3.1 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46c · Secondary","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"severity":"HIGH"}],"references":["https://github.com/handlebars-lang/handlebars.js/commit/68d8df5a88e0a26fe9e6084c5c6aaebe67b07da2","https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.9","https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-3mfm-83xf-c92r","https://access.redhat.com/errata/RHSA-2026:10175","https://access.redhat.com/errata/RHSA-2026:34342","https://access.redhat.com/security/cve/CVE-2026-33938","https://bugzilla.redhat.com/show_bug.cgi?id=2452525","https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-33938.json"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-33938","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Modified","weaknesses":["CWE-94","CWE-843","CWE-917"],"productCriteria":["cpe:2.3:a:handlebarsjs:handlebars:*:*:*:*:*:node.js:*:*"],"sourceDates":{"published":"2026-03-27T21:17:27.587","lastModified":"2026-10-26T22:10:00.163"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-33938","identifiers":["CVE-2026-33938"]},"retained":false,"historicalAffected":[]},{"revision":"37f3c18be754439190eefd4f3af8d563","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-3mfm-83xf-c92r","aliases":["CVE-2026-33938"],"title":"Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block","description":"## Summary\n\nThe `@partial-block` special variable is stored in the template data context and is reachable and mutable from within a template via helpers that accept arbitrary objects. When a helper overwrites `@partial-block` with a crafted Handlebars AST, a subsequent invocation of `{{> @partial-block}}` compiles and executes that AST, enabling arbitrary JavaScript execution on the server.\n\n## Description\n\nHandlebars stores `@partial-block` in the `data` frame that is accessible to templates. In nested contexts, a parent frame's `@partial-block` is reachable as `@_parent.partial-block`. Because the data frame is a mutable object, any registered helper that accepts an object reference and assigns properties to it can overwrite `@partial-block` with an attacker-controlled value.\n\nWhen `{{> @partial-block}}` is subsequently evaluated, `invokePartial` receives the crafted object. The runtime, finding an object that is not a compiled function, falls back to **dynamically compiling** the value via `env.compile()`. If that value is a well-formed Handlebars AST containing injected code, the injected JavaScript runs in the server process.\n\nThe `handlebars-helpers` npm package (commonly used with Handlebars) includes several helpers such as `merge` that can be used as the mutation primitive.\n\n## Proof of Concept\n\nTested with Handlebars 4.7.8 and `handlebars-helpers`:\n\n```javascript\nconst Handlebars = require('handlebars');\nconst merge = require('handlebars-helpers').object().merge;\nHandlebars.registerHelper('merge', merge);\n\nconst vulnerableTemplate = `\n{{#*inline \"myPartial\"}}\n    {{>@partial-block}}\n    {{>@partial-block}}\n{{/inline}}\n{{#>myPartial}}\n    {{merge @_parent partial-block=1}}\n    {{merge @_parent partial-block=payload}}\n{{/myPartial}}\n`;\n\nconst maliciousContext = {\n  payload: {\n    type: \"Program\",\n    body: [\n      {\n        type: \"MustacheStatement\",\n        depth: 0,\n        path: {\n          type: \"PathExpression\",\n          parts: [\"pop\"],\n          original: \"this.pop\",\n          // Code injected via depth field — breaks out of generated function call\n          depth: \"0])),function () {console.error('VULNERABLE: RCE via @partial-block');}()));//\",\n        },\n      },\n    ],\n  },\n};\n\nHandlebars.compile(vulnerableTemplate)(maliciousContext);\n// Prints: VULNERABLE: RCE via @partial-block\n```\n\n## Workarounds\n\n- **Use the runtime-only build** (`require('handlebars/runtime')`). The `compile()` method is  absent, eliminating the vulnerable fallback path.\n- **Audit registered helpers** for any that write arbitrary values to context objects. Helpers  should treat context data as read-only.\n- **Avoid registering helpers** from third-party packages (such as `handlebars-helpers`) in  contexts where templates or context data can be influenced by untrusted input.","state":0,"publishedAt":"2026-03-27T18:20:44+00:00","modifiedAt":"2026-09-10T03:50:36.7846579+00:00","affected":[{"ecosystem":"npm","name":"handlebars","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"4.0.0"},{"kind":"fixed","version":"4.7.9"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-3mfm-83xf-c92r","https://nvd.nist.gov/vuln/detail/CVE-2026-33938","https://github.com/handlebars-lang/handlebars.js/commit/68d8df5a88e0a26fe9e6084c5c6aaebe67b07da2","https://github.com/handlebars-lang/handlebars.js","https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.9"],"sourceUrl":"https://github.com/advisories/GHSA-3mfm-83xf-c92r","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-3mfm-83xf-c92r","identifiers":["GHSA-3mfm-83xf-c92r","CVE-2026-33938"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-01T11:57:48.0676708+00:00","complete":true,"records":1766,"lastAttemptAt":"2026-11-01T11:57:48.0676708+00:00","lastSuccessAt":"2026-11-01T11:57:48.2627764+00:00","error":null,"lastVerifiedAt":"2026-11-01T11:57:48.2627778+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-aece262bb10a694367a43c24d730aa8e8dc171723eaec4c15cdd32f04bda103f-9f544fe753c0f8392473253b79bdd66e19fccf5dd53b170273049f860eb7c038","complete":true,"records":417646,"lastAttemptAt":"2026-11-01T11:57:47.5724102+00:00","lastSuccessAt":"2026-11-01T11:57:47.5551783+00:00","error":null,"lastVerifiedAt":"2026-11-01T11:57:47.5724102+00:00","snapshotPublishedAt":"2026-11-01T11:25:34+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-528825d243c0407387670893d1d5e202","complete":false,"records":13568,"lastAttemptAt":"2026-11-01T12:05:35.9515421+00:00","lastSuccessAt":"2026-11-01T12:05:35.948+00:00","error":null,"lastVerifiedAt":"2026-11-01T12:05:35.948+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13478,"expectedIdentifiers":13637,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-01T11:57:48.0676708+00:00","complete":true,"records":1095,"lastAttemptAt":"2026-11-01T11:57:48.0676708+00:00","lastSuccessAt":"2026-11-01T11:57:48.4468182+00:00","error":null,"lastVerifiedAt":"2026-11-01T11:57:48.4468195+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-fa630f122a1c4f578e086b25b29c2928","complete":true,"records":13580,"lastAttemptAt":"2026-11-01T11:57:49.9076754+00:00","lastSuccessAt":"2026-11-01T11:57:49.904+00:00","error":null,"lastVerifiedAt":"2026-11-01T11:57:49.904+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13637,"expectedIdentifiers":13637,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-21dcd6662970dfea02e4ea60ee637115e8d92664947484d2b9276b3f6568a84f","complete":true,"records":9815,"lastAttemptAt":"2026-11-01T11:57:47.8797972+00:00","lastSuccessAt":"2026-10-30T23:47:34.1817587+00:00","error":null,"lastVerifiedAt":"2026-11-01T11:57:47.8797972+00:00","snapshotPublishedAt":"2026-10-30T23:33:17+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-2de9ccc5290f060c7aa63f89c25dd76f655a64ba1aba7c05c97fa3bee4f09899","complete":true,"records":1967,"lastAttemptAt":"2026-11-01T11:57:47.6499274+00:00","lastSuccessAt":"2026-10-28T20:55:34.2982937+00:00","error":null,"lastVerifiedAt":"2026-11-01T11:57:47.6499274+00:00","snapshotPublishedAt":"2026-10-28T20:03:08+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-f95f76cd406ae5bae3de632ad37fd2d5160b44f5e6b51748ac6f8f0c0c88e72b","complete":true,"records":3028,"lastAttemptAt":"2026-11-01T11:57:47.9991524+00:00","lastSuccessAt":"2026-10-30T23:47:38.4914494+00:00","error":null,"lastVerifiedAt":"2026-11-01T11:57:47.9991524+00:00","snapshotPublishedAt":"2026-10-30T23:18:12+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-55acacd40a7aab88cf530cfddf98233a5d800cfc6bb1883653ecf5bee50f4426","complete":true,"records":230996,"lastAttemptAt":"2026-11-01T11:57:47.7667346+00:00","lastSuccessAt":"2026-11-01T09:06:49.6961926+00:00","error":null,"lastVerifiedAt":"2026-11-01T11:57:47.7667346+00:00","snapshotPublishedAt":"2026-11-01T08:33:39+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}