Read the docs
TI-2023-10938 Aliases CVE-2023-25657GHSA-8mfq-f5wj-vw5m

Remote code execution in Jinja2 template rendering in Nautobot

Priority MEDIUM 46CWE-94Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-94.

Summary

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. This change forces the Jinja2 template engine to use a `SandboxedEnvironment` on all new installations of Nautobot. This addresses any potential unsafe code execution everywhere the helper function `nautobot.utilities.utils.render_jinja2` is called. Additionally, the documentation that had previously suggesting the direct use of `jinja2.Template` has been revised to suggest `render_jinja2`. Users are advised to upgrade to Nautobot 1.5.7 or newer. For users that are unable to upgrade to the latest release of Nautobot, you may add the following setting to your `nautobot_config.py` to apply the sandbox environment enforcement: `TEMPLATES[1]["OPTIONS"]["environment"] = "jinja2.sandbox.SandboxedEnvironment"` After applying this change, you must restart all Nautobot services, including any Celery worker processes. **Note:** *Nautobot specifies two template engines by default, the first being “django” for the Django built-in template engine, and the second being “jinja” for the Jinja2 template engine. This recommended setting will update the second item in the list of template engines, which is the Jinja2 engine.* For users that are unable to immediately update their configuration such as if a Nautobot service restart is too disruptive to operations, access to provide custom Jinja2 template values may be mitigated using permissions to restrict “change” (write) actions to the affected object types listed in the first section. **Note:** *This solution is intended to be stopgap until you can successfully update your `nautobot_config.py` or upgrade your Nautobot instance to apply the sandboxed environment enforcement.*

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.01526 74th percentileScored 2026-11-07
Fix Fixed nautobot (nautobot): 1.5.7nautobot (PyPI): 1.5.7

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
nautobotnautobotbefore 1.5.71.5.7Patch availableCNA
—nautobot (PyPI)before 1.5.71.5.7Patch availableGHSA-8mfq-f5wj-vw5m
  • nautobot Vendornautobot Affected before 1.5.7 Fixed in 1.5.7 Patch available CNA
  • nautobot (PyPI) Vendor— Affected before 1.5.7 Fixed in 1.5.7 Patch available GHSA-8mfq-f5wj-vw5m

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:networktocode:nautobot:*:*:*:*:*:*:*:*before 1.5.7VulnerableNetworktocode
  • cpe:2.3:a:networktocode:nautobot:*:*:*:*:*:*:*:* Versions before 1.5.7 Vulnerable ·Networktocode

Remediation

  • Fix · CNA nautobot (nautobot) Fixed in 1.5.7
  • Fix · GHSA-8mfq-f5wj-vw5m nautobot (PyPI) Fixed in 1.5.7 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-25657
  2. 2026-10-03 Alias added: GHSA-8mfq-f5wj-vw5m

References

  • TI-2026-32681 Nautobot: Webhook definitions could be used for server-side request forgery (SSRF) CVSS 3.1HIGH 8.5
  • TI-2024-23004 Nautobot's BANNER_* configuration can be used to inject arbitrary HTML content into Nautobot pages CVSS 3.1HIGH 7.5
  • TI-2024-21845 Reflected Cross-site Scripting potential in all object list views in Nautobot CVSS 3.1HIGH 7.5
  • TI-2024-15445 Nautobot has XSS potential in rendered Markdown fields CVSS 3.1HIGH 7.1
  • TI-2023-26544 nautobot has XSS potential in custom links, job buttons, and computed fields CVSS 3.1HIGH 7.1
  • TI-2026-32682 Nautobot: GitRepository.current_head field should not be writable through REST API CVSS 3.1HIGH 7.1
See all 20 →

Sources