Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
HIGH severity

CVE-2021-21316 — less-openui5

HIGHFix: SAP/less-openui5@c0d3a85

CVE-2021-21316 is a high-severity (CVSS 7.8) CWE-74 vulnerability in less-openui5. A fix is available for less-openui5 — see the affected versions and patch details below.

Processing untrusted theming resources might execute arbitrary code (ACE)

Also known asGHSA-3crj-w4f5-gwh4
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 8, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.0%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs61th percentile — riskier than 61% of all scored CVEsHighest risk
0.00%0.50%0.99%1.49%0.3%0.3%1.0%1.0%1.0%May 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2021-21316 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

15other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
less-openui5npm
154Kdownloads / week

Description

Impact

When processing theming resources (i.e. *.less files) with less-openui5 that originate from an untrusted source, those resources might contain JavaScript code which will be executed in the context of the build process.

While this is a feature of the Less.js library, it is an unexpected behavior in the context of OpenUI5 and SAPUI5 development.

Especially in the context of UI5 Tooling, which relies on less-openui5, this poses a security threat:

An attacker might create a library or theme-library containing a custom control or theme, hiding malicious JavaScript code in one of the .less files.

This is an example of inline JavaScript in a Less file:

.rule {
	@var: `(function(){console.log('Hello from JavaScript'); process.exit(1);})()`;
	color: @var;
}

Starting with Less.js version 3.0.0, the Inline JavaScript feature is disabled by default. less-openui5 however currently uses a fork of Less.js v1.6.3.

Note that disabling the Inline JavaScript feature in Less.js versions 1.x, still evaluates code has additional double codes around it:

.rule {
	@var: "`(function(){console.log('Hello from JavaScript'); process.exit(1);})()`";
	color: @var;
}

Patches

We decided to remove the inline JavaScript evaluation feature completely from the code of our Less.js fork.

This fix is available in less-openui5 version v0.10.0

Workarounds

Only process trusted theming resources.

For more information

If you have any questions or comments about this advisory:

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmless-openui5all versions0.10.0npm install less-openui5@0.10.0

Affected Products

1 product · 1 configurations
Application
less-openui5less-openui5_project
< 0.10.0
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for less-openui5, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update less-openui5 to 0.10.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-21316 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Frequently Asked Questions

### Impact When processing theming resources (i.e. `*.less` files) with less-openui5 that originate from an untrusted source, those resources might contain JavaScript code which will be executed in the context of the build process. While this is a [feature](http://lesscss.org/usage/#less-options-enable-inline-javascript-deprecated-) of the [Less.js library](https://github.com/less/less.js), it is an unexpected behavior in the context of OpenUI5 and SAPUI5 development. Especially in the context of [UI5 Tooling](https://github.com/SAP/ui5-tooling), which relies on less-openui5, this poses a se
O3 Security · Impact-Aware SCA

Is CVE-2021-21316 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2021-21316: less-openui5 — Fixed in 0.10.0