CVE-2021-43862
Self XSS on user input
Check your servers for CVE-2021-43862
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-43862 affects jquery.terminal, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
jQuery Terminal Emulator is a plugin for creating command line interpreters in your applications. Versions prior to 2.31.1 contain a low impact and limited cross-site scripting (XSS) vulnerability. The code for XSS payload is always visible, but an attacker can use other techniques to hide the code the victim sees. If the application uses the `execHash` option and executes code from URL, the attacker can use this URL to execute their code. The scope is limited because the javascript attribute used is added to span tag, so no automatic execution like with `onerror` on images is possible. This issue is fixed in version 2.31.1. As a workaround, the user can use formatting that wrap whole user input and its no op. The code for this workaround is available in the GitHub Security Advisory. The fix will only work when user of the library is not using different formatters (e.g. to highlight code in different way).
Severity (CVSS)
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- required: a user has to do something, such as open a link or a file
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality low, integrity low, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 1.07%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 65.8% of all scored CVEs. Scores of 1 Dec 2026.
Weakness
- CWE-80 Improper Neutralization of Script-Related HTML Tags in a Web Page
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| jquery.terminal |
affected < 2.31.1
|
Is my server affected?
Find the installed version of jquery.terminal and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i jquery.terminal
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2021-43862 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2021-43862RHEL, Rocky, Alma, Fedora
rpm -q jquery.terminal
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2021-43862Alpine
apk list --installed | grep -i jquery.terminalWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2021-43862
trivy image --scanners vuln IMAGE | grep CVE-2021-43862
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
Other references
- https://github.com/jcubic/jquery.terminal/issues/727 github.com
- https://github.com/jcubic/jquery.terminal/commit/77eb044d0896e990d48a9157f0bc6648f81a84b5 github.com
- https://github.com/jcubic/jquery.terminal/releases/tag/2.31.1 github.com
Source: the record CVE-2021-43862 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse