Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS14OXI1LWp4dnEtNDM4N80g-g

jquery.terminal self XSS on user input

Impact

This is low impact and limited XSS, because code for XSS payload is always visible, but attacker can use other techniques to hide the code the victim sees.

Also if the application use execHash option and execute code from URL the attacker can use this URL to execute his code. The scope is limited because the javascript code inside html attribute used is added to span tag, so no automatic execution like with onerror on images is possible.

Patches

Fixed version 2.31.1

Workarounds

The user can use formatting that wrap whole user input and it's no op.

$.terminal.new_formatter([/([\s\S]+)/g, '[[;;]$1]']);

The fix will only work when user of the library is not using different formatters (e.g. to highlight code in different way).

References

The issue was reported here jcubic/jquery.terminal#727

For more information

If you have any questions or comments about this advisory:

Permalink: https://github.com/advisories/GHSA-x9r5-jxvq-4387
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS14OXI1LWp4dnEtNDM4N80g-g
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Low
Classification: General
Published: over 2 years ago
Updated: about 1 year ago


CVSS Score: 3.7
CVSS vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N

Identifiers: GHSA-x9r5-jxvq-4387, CVE-2021-43862
References: Repository: https://github.com/jcubic/jquery.terminal
Blast Radius: 8.8

Affected Packages

npm:jquery.terminal
Dependent packages: 24
Dependent repositories: 244
Downloads: 13,879 last month
Affected Version Ranges: < 2.31.1
Fixed in: 2.31.1
All affected versions: 0.9.1, 0.9.2, 0.9.3, 0.10.0, 0.10.1, 0.10.2, 0.10.3, 0.10.4, 0.10.5, 0.10.6, 0.10.7, 0.10.8, 0.10.9, 0.10.10, 0.10.11, 0.10.12, 0.11.0, 0.11.1, 0.11.2, 0.11.3, 0.11.4, 0.11.5, 0.11.6, 0.11.7, 0.11.8, 0.11.9, 0.11.10, 0.11.11, 0.11.12, 0.11.13, 0.11.14, 0.11.15, 0.11.16, 0.11.17, 0.11.18, 0.11.19, 0.11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, 2.30.0, 2.30.1, 2.30.2, 2.31.0
All unaffected versions: 2.31.1, 2.32.0, 2.32.1, 2.33.0, 2.33.1, 2.33.2, 2.33.3, 2.34.0, 2.35.0, 2.35.1, 2.35.2, 2.35.3, 2.36.0, 2.37.0, 2.37.1, 2.37.2, 2.38.0, 2.39.0, 2.39.1, 2.39.2, 2.39.3, 2.40.0, 2.40.1, 2.40.2, 2.40.3, 2.40.4, 2.40.5, 2.40.6