# CVE-2021-21316: Arbitrary code execution in less-openui5

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.3
- **CVSS:** 6.3 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: None; User interaction: Required; Scope: Changed (impact reaches other components); Confidentiality impact: None; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 1.00% (percentile 62, 2026-11-28)
- **CWE:** CWE-74
- **Aliases:** GHSA-3crj-w4f5-gwh4
- **Published:** 2021-01-29T20:51:37.000Z
- **Modified:** 2026-07-08T06:28:29.484Z

## Who should check

- Projects that depend on npm package less-openui5 (\< 0.10.0)
- Anyone running SAP less-openui5 \< 0.10.0

## Description

less-openui5 is an npm package which enables building OpenUI5 themes with Less.js. In less-openui5 before version 0.10., 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. 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. Refer to the referenced GHSA-3crj-w4f5-gwh4 for examples. 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. 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 0.10.0.

## Affected and fixed versions

- npm `less-openui5`: affected \< 0.10.0; fixed 0.10.0 (osv)
- SAP less-openui5: \< 0.10.0 (cvelist)

## Mitigation

- Upgrade less-openui5 to 0.10.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-21316. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-21316.md
Affected: less-openui5 < 0.10.0
Fixed in: 0.10.0

Steps:
1. Search this machine and project for less-openui5 (npm), SAP less-openui5: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-21316 being exploited?

There is no confirmed exploitation: CVE-2021-21316 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.00% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2021-21316?

Medium: CVSS 6.3 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2021-21316?

less-openui5 \< 0.10.0.

### Is there a fix for CVE-2021-21316?

Yes. Fixed in 0.10.0. Upgrade less-openui5 to 0.10.0 or later.

### How do I check if I'm affected by CVE-2021-21316?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/SAP/less-openui5/security/advisories/GHSA-3crj-w4f5-gwh4>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2021-21316>
- patch: <https://github.com/SAP/less-openui5/commit/c0d3a8572974a20ea6cee42da11c614a54f100e8>
- other: <https://github.com/SAP/less-openui5/releases/tag/v0.10.0>
- other: <https://www.npmjs.com/package/less-openui5>
- other: <http://lesscss.org/usage/#less-options-enable-inline-javascript-deprecated->

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-21316>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-3crj-w4f5-gwh4> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2021-21316> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-21316>
