Security
Headlines
HeadlinesLatestCVEs

Headline

GHSA-q765-wm9j-66qj: @blakeembrey/template vulnerable to code injection when attacker controls template input

Impact

It is possible to inject and run code within the template if the attacker has access to write the template name.

const { template } = require('@blakeembrey/template');

template("Hello {{name}}!", "exploit() {} && ((()=>{ console.log('success'); })()) && function pwned");

Patches

Upgrade to 1.2.0.

Workarounds

Don’t pass untrusted input as the template display name, or don’t use the display name feature.

References

Fixed by removing in https://github.com/blakeembrey/js-template/commit/b8d9aa999e464816c6cfb14acd1ad0f5d1e335aa.

ghsa
#nodejs#js#git
  1. GitHub Advisory Database
  2. GitHub Reviewed
  3. CVE-2024-45390

@blakeembrey/template vulnerable to code injection when attacker controls template input

High severity GitHub Reviewed Published Sep 3, 2024 in blakeembrey/js-template • Updated Sep 3, 2024

Package

npm @blakeembrey/template (npm)

Affected versions

< 1.2.0

Impact

It is possible to inject and run code within the template if the attacker has access to write the template name.

const { template } = require(‘@blakeembrey/template’);

template("Hello {{name}}!", “exploit() {} && ((()=>{ console.log(‘success’); })()) && function pwned”);

Patches

Upgrade to 1.2.0.

Workarounds

Don’t pass untrusted input as the template display name, or don’t use the display name feature.

References

Fixed by removing in blakeembrey/js-template@b8d9aa9.

References

  • GHSA-q765-wm9j-66qj
  • blakeembrey/js-template@b8d9aa9

Published to the GitHub Advisory Database

Sep 3, 2024

ghsa: Latest News

GHSA-8fh4-942r-jf2g: LibreNMS has a Stored XSS ('Cross-site Scripting') in librenms/includes/html/pages/device/services.inc.php