CVE-2021-21313 XSS on tabs

Medium 4.9 Published Updated

An attacker can execute arbitrary JavaScript in the victim's browser via unsanitized parameters in the tabs endpoint, potentially stealing cookies.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2021-21313?

CVE-2021-21313 is a medium-severity cross-site scripting vulnerability in Glpi-Project Glpi, published on 3 Mar 2021. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

GLPI is open source software which stands for Gestionnaire Libre de Parc Informatique and it is a Free Asset and IT Management Software package. In GLPI before verison 9.5.4, there is a vulnerability in the /ajax/common.tabs.php endpoint, indeed, at least two parameters _target and id are not properly sanitized. Here are two payloads (due to two different exploitations depending on which parameter you act) to exploit the vulnerability:/ajax/common.tabs.php?_target=javascript:alert(document.cookie)&_itemtype=DisplayPreference&_glpi_tab=DisplayPreference$2&id=258&displaytype=Ticket (Payload triggered if you click on the button). /ajax/common.tabs.php?_target=/front/ticket.form.php&_itemtype=Ticket&_glpi_tab=Ticket$1&id=(){};(function%20(){alert(document.cookie);})();function%20a&#.

Weakness: CWE-79, CWE-74

Which versions are affected by CVE-2021-21313?

It affects 1 product.

Products include Glpi-Project Glpi.

How do I fix CVE-2021-21313?

No fix has been published for CVE-2021-21313 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2021-21313 being exploited?

There is no known exploitation of CVE-2021-21313 in the wild and no public exploit code.

All Glpi-Project Glpi vulnerabilities

Sources

Also known as GHSA-h4hj-mrpg-xfgx, UBUNTU-CVE-2021-21313.

Is CVE-2021-21313 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free