FKIE_CVE-2026-16231

Vulnerability from fkie_nvd - Published: 2026-08-25 10:18 - Updated: 2026-09-28 23:10
Summary
hbs is an Express view engine that wraps Handlebars. Its registerAsyncHelper API bypasses Handlebars' automatic HTML escaping: an async helper returns an opaque placeholder during the first render pass, so the double-brace expression escapes only the placeholder, and after rendering hbs substitutes the placeholder with the raw callback return value without escaping it, across the cached, uncached, and layout render paths. An application that passes attacker-influenced data, for example user-supplied content from a database, into an async helper callback can therefore have arbitrary HTML and JavaScript injected into the server-rendered page, resulting in stored or reflected cross-site scripting. Versions 2.1.0 through 4.2.1 are affected, and the issue is fixed in 4.3.0, which HTML-escapes async helper output. Applications that intentionally emit raw HTML from an async helper can opt in explicitly with hbs.SafeString. Users should upgrade to 4.3.0.
Impacted products
Vendor Product Version
hbs_project hbs *

{
  "affected": [
    {
      "affectedData": [
        {
          "defaultStatus": "unaffected",
          "packageURL": "pkg:npm/hbs",
          "product": "hbs",
          "vendor": "hbs",
          "versions": [
            {
              "lessThan": "4.3.0",
              "status": "affected",
              "version": "2.1.0",
              "versionType": "semver"
            },
            {
              "status": "unaffected",
              "version": "4.3.0",
              "versionType": "semver"
            }
          ]
        }
      ],
      "source": "ce714d77-add3-4f53-aff5-83d477b104bb"
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "cpeMatch": [
            {
              "criteria": "cpe:2.3:a:hbs_project:hbs:*:*:*:*:*:node.js:*:*",
              "matchCriteriaId": "185D8222-1F3D-4CA4-8D30-2F45910A4B7B",
              "versionEndExcluding": "4.3.0",
              "versionStartIncluding": "2.1.0",
              "vulnerable": true
            }
          ],
          "negate": false,
          "operator": "OR"
        }
      ]
    }
  ],
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "hbs is an Express view engine that wraps Handlebars. Its registerAsyncHelper API bypasses Handlebars\u0027 automatic HTML escaping: an async helper returns an opaque placeholder during the first render pass, so the double-brace expression escapes only the placeholder, and after rendering hbs substitutes the placeholder with the raw callback return value without escaping it, across the cached, uncached, and layout render paths. An application that passes attacker-influenced data, for example user-supplied content from a database, into an async helper callback can therefore have arbitrary HTML and JavaScript injected into the server-rendered page, resulting in stored or reflected cross-site scripting. Versions 2.1.0 through 4.2.1 are affected, and the issue is fixed in 4.3.0, which HTML-escapes async helper output. Applications that intentionally emit raw HTML from an async helper can opt in explicitly with hbs.SafeString. Users should upgrade to 4.3.0."
    },
    {
      "lang": "es",
      "value": "hbs es un motor de vistas de Express que envuelve Handlebars. Su API registerAsyncHelper omite el escape autom\u00e1tico de HTML de Handlebars: un ayudante as\u00edncrono devuelve un marcador de posici\u00f3n opaco durante la primera pasada de renderizado, por lo que la expresi\u00f3n de doble llave escapa solo el marcador de posici\u00f3n, y despu\u00e9s de renderizar hbs sustituye el marcador de posici\u00f3n con el valor de retorno de la devoluci\u00f3n de llamada sin procesar sin escaparlo, a trav\u00e9s de las rutas de renderizado en cach\u00e9, sin cach\u00e9 y de dise\u00f1o. Una aplicaci\u00f3n que pasa datos influenciados por el atacante, por ejemplo contenido proporcionado por el usuario de una base de datos, a una devoluci\u00f3n de llamada de ayudante as\u00edncrono puede, por lo tanto, tener HTML y JavaScript arbitrarios inyectados en la p\u00e1gina renderizada por el servidor, lo que resulta en cross-site scripting almacenado o reflejado. Las versiones 2.1.0 a 4.2.1 est\u00e1n afectadas, y el problema est\u00e1 solucionado en la 4.3.0, que escapa el HTML de la salida del ayudante as\u00edncrono. Las aplicaciones que emiten intencionalmente HTML sin procesar desde un ayudante as\u00edncrono pueden optar expl\u00edcitamente con hbs.SafeString. Los usuarios deben actualizar a la 4.3.0."
    }
  ],
  "id": "CVE-2026-16231",
  "lastModified": "2026-09-28T23:10:00.143",
  "metrics": {
    "cvssMetricV31": [
      {
        "cvssData": {
          "attackComplexity": "LOW",
          "attackVector": "NETWORK",
          "availabilityImpact": "NONE",
          "baseScore": 8.1,
          "baseSeverity": "HIGH",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "privilegesRequired": "NONE",
          "scope": "UNCHANGED",
          "userInteraction": "REQUIRED",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
          "version": "3.1"
        },
        "exploitabilityScore": 2.8,
        "impactScore": 5.2,
        "source": "ce714d77-add3-4f53-aff5-83d477b104bb",
        "type": "Secondary"
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "id": "CVE-2026-16231",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "total"
            }
          ],
          "role": "CISA Coordinator",
          "timestamp": "2026-08-25T19:47:24.248925Z",
          "version": "2.0.3"
        }
      }
    ]
  },
  "published": "2026-08-25T10:18:04.080",
  "references": [
    {
      "source": "ce714d77-add3-4f53-aff5-83d477b104bb",
      "tags": [
        "Vendor Advisory"
      ],
      "url": "https://cna.openjsf.org/security-advisories.html"
    },
    {
      "source": "ce714d77-add3-4f53-aff5-83d477b104bb",
      "tags": [
        "Vendor Advisory"
      ],
      "url": "https://github.com/pillarjs/hbs/security/advisories/GHSA-rg36-rxv9-2m9q"
    }
  ],
  "sourceIdentifier": "ce714d77-add3-4f53-aff5-83d477b104bb",
  "vulnStatus": "Analyzed",
  "weaknesses": [
    {
      "description": [
        {
          "lang": "en",
          "value": "CWE-79"
        }
      ],
      "source": "ce714d77-add3-4f53-aff5-83d477b104bb",
      "type": "Secondary"
    }
  ]
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…