CVE-2023-50263 – Nautobot allows unauthenticated db-file-storage views
https://notcve.org/view.php?id=CVE-2023-50263
Nautobot is a Network Source of Truth and Network Automation Platform built as a web application atop the Django Python framework with a PostgreSQL or MySQL database. In Nautobot 1.x and 2.0.x prior to 1.6.7 and 2.0.6, the URLs `/files/get/?name=...` and `/files/download/?name=...` are used to provide admin access to files that have been uploaded as part of a run request for a Job that has FileVar inputs. Under normal operation these files are ephemeral and are deleted once the Job in question runs. In the default implementation used in Nautobot, as provided by `django-db-file-storage`, these URLs do not by default require any user authentication to access; they should instead be restricted to only users who have permissions to view Nautobot's `FileProxy` model instances. Note that no URL mechanism is provided for listing or traversal of the available file `name` values, so in practice an unauthenticated user would have to guess names to discover arbitrary files for download, but if a user knows the file name/path value, they can access it without authenticating, so we are considering this a vulnerability. Fixes are included in Nautobot 1.6.7 and Nautobot 2.0.6. • https://github.com/nautobot/nautobot/commit/458280c359a4833a20da294eaf4b8d55edc91cee https://github.com/nautobot/nautobot/commit/7c4cf3137f45f1541f09f2f6a7f8850cd3a2eaee https://github.com/nautobot/nautobot/pull/4959 https://github.com/nautobot/nautobot/pull/4964 https://github.com/nautobot/nautobot/security/advisories/GHSA-75mc-3pjc-727q https://github.com/victor-o-silva/db_file_storage/blob/master/db_file_storage/views.py • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor CWE-306: Missing Authentication for Critical Function •
CVE-2023-48705 – nautobot has XSS potential in custom links, job buttons, and computed fields
https://notcve.org/view.php?id=CVE-2023-48705
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. • https://docs.djangoproject.com/en/3.2/ref/utils/#django.utils.html.format_html https://docs.djangoproject.com/en/3.2/ref/utils/#django.utils.safestring.mark_safe https://github.com/nautobot/nautobot/commit/362850f5a94689a4c75e3188bf6de826c3b012b2 https://github.com/nautobot/nautobot/commit/54abe23331b6c3d0d82bf1b028c679b1d200920d https://github.com/nautobot/nautobot/pull/4832 https://github.com/nautobot/nautobot/pull/4833 https://github.com/nautobot/nautobot/security/advisories/GHSA-cf9f-wmhp-v4pr • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') •
CVE-2023-25657 – Remote code execution in Jinja2 template rendering in Nautobot
https://notcve.org/view.php?id=CVE-2023-25657
Nautobot is a Network Source of Truth and Network Automation Platform. All users of Nautobot versions earlier than 1.5.7 are impacted by a remote code execution vulnerability. Nautobot did not properly sandbox Jinja2 template rendering. In Nautobot 1.5.7 has enabled sandboxed environments for the Jinja2 template engine used internally for template rendering for the following objects: `extras.ComputedField`, `extras.CustomLink`, `extras.ExportTemplate`, `extras.Secret`, `extras.Webhook`. While no active exploits of this vulnerability are known this change has been made as a preventative measure to protect against any potential remote code execution attacks utilizing maliciously crafted template code. • https://github.com/nautobot/nautobot/commit/d47f157e83b0c353bb2b697f911882c71cf90ca0 https://github.com/nautobot/nautobot/security/advisories/GHSA-8mfq-f5wj-vw5m https://jinja.palletsprojects.com/en/3.0.x/sandbox/#sandbox • CWE-94: Improper Control of Generation of Code ('Code Injection') •