Cross-Site Scripting Vulnerability in @berslucas/liljs

@berslucas/liljs Updated 02 Oct 2025

Summary

03/09/2020
MODERATE
Yes i
Moderate
6.5

GHSA-c53x-wwx2-pg96: Cross-Site Scripting in @berslucas/liljs. Affects @berslucas/liljs versions < 1.0.2. Fixed in 1.0.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The @berslucas/liljs package is an npm package that provides functionality for JavaScript templating. It allows developers to generate HTML content dynamically. However, versions prior to 1.0.2 are vulnerable to a Cross-Site Scripting (XSS) attack. This vulnerability arises from the package's use of the unsafe innerHTML function without proper input sanitization. As a result, attackers can inject and execute arbitrary JavaScript code on the victim's browser.

Vulnerability Detail

The Cross-Site Scripting (XSS) vulnerability in @berslucas/liljs allows attackers to inject malicious JavaScript code into the generated HTML content. This can lead to various security risks, such as session hijacking, defacement of web pages, and theft of sensitive user information. The vulnerability has a CVSS score of 6.5, indicating a moderate severity level. The CWE ID associated with this vulnerability is CWE-79.

How To Fix

Latest published version: 4.0.2 as of 22 Oct 2026

npm install @berslucas/liljs@4.0.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.0.2

This is the first release that contains the fix.

npm install @berslucas/liljs@1.0.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version is not immediately feasible, developers can implement their own input sanitization before using the @berslucas/liljs package. This can involve using a library or framework that provides secure HTML escaping functions, such as the 'escape-html' module in Node.js. By properly sanitizing user input, the risk of XSS attacks can be mitigated.

Conclusion

The @berslucas/liljs package prior to version 1.0.2 is vulnerable to Cross-Site Scripting (XSS) attacks. It is crucial for developers to upgrade to the latest secure version or implement proper input sanitization to mitigate the risk of XSS vulnerabilities. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for @berslucas/liljs →

Share this vulnerability

FAQ

Cross-Site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. This can lead to various attacks, such as stealing sensitive information or performing actions on behalf of the victim.

The @berslucas/liljs package becomes vulnerable to XSS because it uses the unsafe innerHTML function without properly sanitizing user input. This allows attackers to inject malicious scripts into the generated HTML content.

The potential consequences of this vulnerability include session hijacking, defacement of web pages, theft of sensitive user information, and the execution of arbitrary JavaScript code on the victim's browser.

Yes, upgrading to version 1.0.2 or later of the @berslucas/liljs package fixes this vulnerability. The updated version includes proper input sanitization to prevent XSS attacks.

If upgrading to the latest version is not immediately feasible, developers can implement their own input sanitization before using the @berslucas/liljs package. This involves using a library or framework that provides secure HTML escaping functions.

How To Fix

Latest published version: 4.0.2 as of 22 Oct 2026

npm install @berslucas/liljs@4.0.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.0.2

This is the first release that contains the fix.

npm install @berslucas/liljs@1.0.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback