Skip to content
Noroxi

Handlebars vulnerabilitiesHandlebars: known vulnerabilities and safe versions

npm: handlebars

Handlebars has 25 known vulnerability records: 15 in the npm advisory data (GitHub Advisory Database via OSV, the same source npm audit uses) and 10 only in Retire.js (CDN builds and advisories without a CVE).

By branch: 4.x is safe from 4.7.10; 3.x has no fixed release in the records.

Vulnerabilities and safe version by branch

Safe version: on that branch, this release and every later one (up to the branch's latest release, where known) fall outside every known record's range. Candidates are only the records' own fixed versions and the branch's latest release; "No fix" means moving off the branch.

BranchSupportLatest on branchRecordsSafe version
4.x——23critical4.7.10
3.x——11criticalNo fix

Support dates appear only for libraries that endoflife.date tracks.

Records

Newest first. Ranges are the record's own data; several ranges mean separate fixes per branch.

  • CVE-2026-1064462026-10-06

    Handlebars: JavaScript Injection via AST Type Confusion in compile (Program.blockParams)

    Affected versions: >= 4.0.0, < 4.7.10

    critical 9.8

    Fixed in: 4.7.10

  • CVE-2026-106445exploit code exists2026-10-06

    Handlebars: JavaScript Injection via Own Property Check Bypass

    Affected versions: >= 3.0.0, < 4.7.10

    critical 9.2

    Fixed in: 4.7.10

  • CVE-2026-1064442026-10-06

    Handlebars: JavaScript Injection via Unsafe Inline Embedding of Precompiled Templates

    Affected versions: >= 4.0.0, < 4.7.10

    medium 4.7

    Fixed in: 4.7.10

  • CVE-2026-339412026-03-27

    Handlebars.js has JavaScript Injection in CLI Precompiler via Unescaped Names and Options

    Affected versions: >= 4.0.0, < 4.7.9

    high 8.2

    Fixed in: 4.7.9

  • CVE-2026-339402026-03-27

    Handlebars.js has JavaScript Injection via AST Type Confusion when passing an object as dynamic partial

    Affected versions: >= 4.0.0, < 4.7.9

    high 8.1

    Fixed in: 4.7.9

  • CVE-2026-339392026-03-27

    Handlebars.js has Denial of Service via Malformed Decorator Syntax in Template Compilation

    Affected versions: >= 4.0.0, < 4.7.9

    high 7.5

    Fixed in: 4.7.9

  • CVE-2026-339382026-03-27

    Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block

    Affected versions: >= 4.0.0, < 4.7.9

    high 8.1

    Fixed in: 4.7.9

  • CVE-2026-33937exploit code exists2026-03-27

    Handlebars.js has JavaScript Injection via AST Type Confusion

    Affected versions: >= 4.0.0, < 4.7.9

    critical 9.8

    Fixed in: 4.7.9

    EPSS 1.7%

  • CVE-2026-339162026-03-27

    Handlebars.js has Prototype Pollution Leading to XSS through Partial Template Injection

    Affected versions: >= 4.0.0, < 4.7.9

    medium 4.7

    Fixed in: 4.7.9

  • CVE-2021-23383exploit code exists2021-05-04

    The package handlebars before 4.7.7 are vulnerable to Prototype Pollution when selecting certain compiling options to compile templates comi

    Affected versions: < 4.7.7

    critical 9.8

    Fixed in: 4.7.7

    EPSS 4.5%

  • CVE-2021-23369exploit code exists2021-04-12

    Remote Code Execution (RCE)

    Affected versions: < 4.7.7

    critical 9.8

    Fixed in: 4.7.7

    EPSS 7%

  • CVE-2019-209222020-09-30

    Handlebars before 4.4.5 allows Regular Expression Denial of Service (ReDoS) because of eager matching.

    Affected versions: >= 4.0.0, < 4.4.5

    high 7.5

    Fixed in: 4.4.5

    EPSS 3.6%

  • CVE-2019-209202020-09-30

    Handlebars before 3.0.8 and 4.x before 4.5.3 is vulnerable to Arbitrary Code Execution.

    Affected versions: < 3.0.8 · >= 4.0.0, < 4.5.3

    high 8.1

    Fixed in: 3.0.8, 4.5.3

    EPSS 3.1%

  • CVE-2019-19919exploit code exists2019-12-20

    Versions of handlebars prior to 4.3.0 are vulnerable to Prototype Pollution leading to Remote Code Execution.

    Affected versions: >= 4.0.0, < 4.3.0 · < 3.0.8

    critical 9.8

    Fixed in: 3.0.8, 4.3.0

    EPSS 7%

  • CVE-2015-88612017-01-23

    The handlebars package before 4.0.0 for Node.js allows remote attackers to conduct cross-site scripting (XSS) attacks by leveraging a templa

    Affected versions: < 4.0.0

    medium 6.1

    Fixed in: 4.0.0

    EPSS 2.6%

  • no CVE

    Denial of service

    Affected versions: < 4.6.0

    medium

    Fixed in: 4.6.0

  • no CVE

    A prototype pollution vulnerability in handlebars is exploitable if an attacker can control the template

    Affected versions: >= 4.0.0, < 4.0.13

    high

    Fixed in: 4.0.13

  • no CVE

    poorly sanitized input passed to eval()

    Affected versions: < 1.0.0.beta.3

    medium

    Fixed in: 1.0.0.beta.3

  • GHSA-q42p-pg8m-cqh6

    A prototype pollution vulnerability in handlebars is exploitable if an attacker can control the template

    Affected versions: < 3.0.7 · >= 4.0.0, < 4.0.14 · >= 4.1.0, < 4.1.2

    high

    Fixed in: 3.0.7, 4.0.14, 4.1.2

  • GHSA-q2c6-c6pm-g3gh

    Handlebars prior to 3.0.8 or 4.5.3 is vulnerable to Arbitrary Code Execution; the lookup helper fails to properly validate templates, allowing attackers to run arbitrary JavaScript in the server or victim's browser.

    Affected versions: < 3.0.8 · >= 4.0.0, < 4.5.3

    high

    Fixed in: 3.0.8, 4.5.3

  • GHSA-g9r4-xpmj-mj65

    Prototype pollution

    Affected versions: < 3.0.8 · >= 4.0.0, < 4.5.3

    high

    Fixed in: 3.0.8, 4.5.3

  • GHSA-f52g-6jhx-586p

    Affected versions of Handlebars are vulnerable to Denial of Service. The template parser can be forced into an endless loop when processing specially crafted templates, potentially exhausting system resources.

    Affected versions: >= 4.0.0, < 4.4.5

    medium

    Fixed in: 4.4.5

  • GHSA-7rx3-28cr-v5wh

    Handlebars has an asymmetric prototype method blocklist where __lookupSetter__ is omitted while its counterparts are blocked. When the non-default runtime option allowProtoMethodsByDefault is set to true, __lookupSetter__ becomes accessible

    Affected versions: >= 4.6.0, < 4.7.9

    medium

    Fixed in: 4.7.9

  • GHSA-442j-39wm-28r2

    Handlebars has a time-of-check/time-of-use flaw in container.lookup() when the compat compile option is enabled. The function uses lookupProperty() as a security gate but then discards its result and performs a raw unguarded property access

    Affected versions: >= 4.0.0, < 4.7.9

    low

    Fixed in: 4.7.9

  • GHSA-2cf5-4w76-r9qv

    Versions of Handlebars prior to 3.0.8 or 4.5.2 are vulnerable to Arbitrary Code Execution. The lookup helper fails to properly validate templates, allowing attackers to craft templates that execute arbitrary JavaScript on the server or in a

    Affected versions: < 3.0.8 · >= 4.0.0, < 4.5.2

    high

    Fixed in: 3.0.8, 4.5.2

Sources and method

Ranges: GitHub Advisory Database (OSV npm export, daily) and Retire.js (Apache-2.0). Exploitation: CISA KEV, FIRST EPSS and exploit maturity from the Noroxi CVE database. Support dates: endoflife.date.

This page and the JavaScript library scan use the same matching rule: a row without bounds is not evidence, and versions are compared in one place. A record without a version range never counts as "affected" in the version check.

Data as of October 21, 2026.

Other libraries