CVE-2021-43862

Self XSS on user input

MEDIUM
5.4
CVSS Score
Published: December 30, 2021 at 02:15 PM UTC
Updated: June 17, 2026 at 04:11 AM UTC
2 products affected across 2 vendorsJquery.terminalTerminal Project Jquery Terminal

Using jquery.terminal by jcubic?

Get instant alerts when new vulnerabilities affect jquery.terminal - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.4
Exploit prediction
EPSS 1%

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).

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 2.31.1
Affected range stops below 2.31.1, so it looks safe — our inference, not a vendor statement
v < 2.31.1
Affected range stops below 2.31.1, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (4)

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-80CWE-79

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card