CVE-2023-48705 nautobot has XSS potential in custom links, job buttons, and computed fields

High 7.1 Published Updated

Attackers with edit permissions can inject malicious scripts into custom links or fields, leading to code execution or account takeover in Nautobot.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2023-48705?

CVE-2023-48705 is a high-severity cross-site scripting vulnerability in nautobot, published on 22 Nov 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

Nautobot is a Network Source of Truth and Network Automation Platform built as a web application All users of Nautobot versions earlier than 1.6.6 or 2.0.5 are potentially affected by a cross-site scripting vulnerability. Due to incorrect usage of Django's `mark_safe()` API when rendering certain types of user-authored content; including custom links, job buttons, and computed fields; it is possible that users with permission to create or edit these types of content could craft a malicious payload (such as JavaScript code) that would be executed when rendering pages containing this content. The maintainers have fixed the incorrect uses of `mark_safe()` (generally by replacing them with appropriate use of `format_html()` instead) to prevent such malicious data from being executed. Users on Nautobot 1.6.x LTM should upgrade to v1.6.6 and users on Nautobot 2.0.x should upgrade to v2.0.5. Appropriate object permissions can and should be applied to restrict which users are permitted to create or edit the aforementioned types of user-authored content. Other than that, there is no direct workaround available.

Weakness: CWE-79

Which versions are affected by CVE-2023-48705?

5 open source packages ship an affected version, including nautobot. It affects 1 product.

PackageAffectedFixed in
nautobot PyPIAll versions1.6.6
nautobot PyPIAll versions1.6.6
nautobot PyPIFrom 2.0.02.0.5, 1.6.6
nautobot PyPIFrom 2.0.02.0.5
nautobot PyPIFrom 2.0.02.0.5

Products include Networktocode Nautobot.

How do I fix CVE-2023-48705?

Upgrade nautobot to a fixed version for your release line: 1.6.6 or 2.0.5.

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-2023-48705 being exploited?

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

Sources

Also known as GHSA-cf9f-wmhp-v4pr, PYSEC-2023-285.

Is CVE-2023-48705 in your software?

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

Check your SBOMs for free