{"schemaVersion":3,"id":"CVE-2021-32822","aliases":["GHSA-7f5c-rpf4-86p8"],"status":"published","duplicateOf":null,"title":null,"description":"The npm hbs package is an Express view engine wrapper for Handlebars. Depending on usage, users of hbs may be vulnerable to a file disclosure vulnerability. There is currently no patch for this vulnerability. hbs mixes pure template data with engine configuration options through the Express render API. By overwriting internal configuration options a file disclosure vulnerability may be triggered in downstream applications. For an example PoC see the referenced GHSL-2021-020.","dates":{"published":"2021-08-16T18:45:10.000Z","modified":"2024-08-03T23:33:55.940Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":5.3,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":4,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Npm","score":4,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N","exploitability":5.6,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":5.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":5,"severity":"medium","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.01131,"percentile":0.66121,"severity":"low","asOf":"2026-10-21T00:00:00.000Z","change":{"pp":-0.04699999999999999,"baselineDate":"2026-09-21T00:00:00.000Z","baselineScore":0.01178},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.01131,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.01131,"percentile":0.66121}],"last30":[{"date":"2026-09-21T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01178,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.01131,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.01131,"percentile":0.66121}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"GITHUB_ADVISORIES_GHSL-2021-020-PILLARJS-HBS","name":"Ghsl 2021 020 Pillarjs Hbs","source":"github","url":"https://securitylab.github.com/advisories/GHSL-2021-020-pillarjs-hbs/","maturity":"poc","reliabilityScore":0.3,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-538","name":"Insertion of Sensitive Information into Externally-Accessible File or Directory","description":"The product places sensitive information into files or directories that are accessible to actors who are allowed to have access to the files, but not to the sensitive information.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/538.html"},{"id":"CWE-94","name":"Improper Control of Generation of Code ('Code Injection')","description":"The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/94.html"}],"affected":[{"vendor":"hbs_project","product":"hbs","name":"hbs","label":"hbs","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"na","noFixRecorded":false,"fixedIn":null}],"versionsText":"na","eol":null,"hubHref":"/vendor/hbs_project/hbs"},{"vendor":"Npm","product":"hbs","name":"hbs","label":"hbs","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/hbs","purlType":"npm","versions":[{"text":"≤ 4.1.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"≤ 4.1.2","eol":null,"hubHref":null},{"vendor":"pillarjs","product":"hbs","name":"hbs","label":"hbs","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"all","noFixRecorded":false,"fixedIn":null}],"versionsText":"all","eol":null,"hubHref":"/vendor/pillarjs/hbs"}],"affectedCount":3,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://securitylab.github.com/advisories/GHSL-2021-020-pillarjs-hbs/","label":"securitylab.github.com/advisories/GHSL-2021-020-pillarjs-hbs/","hostname":"securitylab.github.com","tags":["X Refsource CONFIRM","Exploit","Third Party Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32822","label":"nvd.nist.gov/vuln/detail/CVE-2021-32822","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/pillarjs/hbs","label":"github.com/pillarjs/hbs","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://securitylab.github.com/advisories/GHSL-2021-020-pillarjs-hbs","label":"securitylab.github.com/advisories/GHSL-2021-020-pillarjs-hbs","hostname":"securitylab.github.com","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2021-08-16T18:45:10.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-03T23:33:55.940Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":31,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T20:13:17.305Z","stale":false,"partial":false}}