☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 6 🐛 CWE-1336
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-49142

CVE-2025-49142 Server-Side Template Injection in Nautobot
📅 PUBLISHED: 2025-06-10 15:40 UTC 🔄 UPDATED: 2026-09-23 20:28 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.36%
👁️
0.36% probability
9.1× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
6.0
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-49142 is a critical server-side template injection (SSTI) vulnerability in Nautobot, a Network Source of Truth and Network Automation Platform. The flaw resides in the Jinja2 templating feature used in computed fields, custom links, and similar components. Due to insufficient security configuration, a malicious user with appropriate permissions can craft Jinja2 templates that, when rendered, expose the values of Secrets defined in Nautobot or call Python APIs to modify data, bypassing object permissions. This allows for unauthorized data exfiltration and potential data manipulation. The vulnerability affects all Nautobot versions prior to 1.6.32 and 2.4.10. A partial mitigation involves strict object permission controls, but a full patch is required.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

Nautobot is a Python-based application distributed via PyPI. The vulnerability is inherent in the application's use of Jinja2 templating. Users should ensure they are using the latest patched versions (1.6.32 or 2.4.10) from the official PyPI repository. Verify package integrity via checksums provided by the Nautobot project.

CVSS Breakdown & Threat Level

While the official CVSS score is 0.0 (likely unassigned at time of analysis), based on the vulnerability description, a reasonable CVSS v3.1 vector would be:

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N (Base Score: 8.1 - High)

  • Attack Vector (AV): Network - The vulnerability can be exploited remotely.
  • Attack Complexity (AC): Low - No special conditions are required.
  • Privileges Required (PR): Low - An attacker needs a valid user account with permissions to configure computed fields or custom links.
  • User Interaction (UI): None - No user interaction is required.
  • Scope (S): Unchanged - The vulnerable component and the impacted component are the same.
  • Confidentiality (C): High - Secrets can be exposed.
  • Integrity (I): High - Data can be modified via Python API calls.
  • Availability (A): None - The vulnerability does not directly impact availability.

Threat Level: High. The ability to exfiltrate secrets and modify data without proper authorization poses a significant risk to network automation environments.

Deep Dive & Mechanics

The vulnerability is a classic Server-Side Template Injection (SSTI) in Jinja2. Nautobot uses Jinja2 to render dynamic content in computed fields, custom links, and similar features. The template engine is configured with insufficient sandboxing, allowing access to Python objects and functions.

Mechanism:

  1. Privileged User Action: A user with permission to create or edit computed fields or custom links injects a malicious Jinja2 template.
  2. Template Rendering: When a user views an object that uses this computed field or custom link, Nautobot renders the template server-side.
  3. Exploitation: The malicious template can access the Jinja2 environment's built-in functions and Python objects. For example:
    • Secret Exposure: {{ secrets.get("my_secret_key") }} or by iterating through the secrets object.
    • Data Manipulation: {{ __import__('os').system('nautobot-server shell --command "..."') }} or by calling Nautobot's internal APIs to modify objects.
  4. Bypass of Permissions: The template executes in the context of the server, not the viewing user. Therefore, it can access data and perform actions that the viewing user would not normally be authorized to do.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

# In a view or template rendering function
from jinja2 import Environment

env = Environment()
template = env.from_string(user_provided_template)
rendered = template.render(context)

The Environment is created with default settings, which allow access to Python built-ins and objects.

Patched Code (Conceptual):

from jinja2 import Environment, BaseLoader, sandbox

# Use a sandboxed environment
env = Environment(loader=BaseLoader(), undefined=StrictUndefined)
env.globals.clear()
env.filters.clear()
env.tests.clear()

# Or use the SandboxedEnvironment
from jinja2.sandbox import SandboxedEnvironment
env = SandboxedEnvironment()

template = env.from_string(user_provided_template)
rendered = template.render(context)

The patched version uses a SandboxedEnvironment or explicitly clears globals, filters, and tests to prevent access to dangerous functions. Additionally, the secrets object should be explicitly excluded from the template context or made inaccessible.

Exploitation & Lab Setup

Red Team (Attack Simulation)

Prerequisites:

  • A Nautobot instance (version < 1.6.32 or < 2.4.10).
  • A user account with permissions to create/edit computed fields or custom links.

Steps:

  1. Login: Authenticate to the Nautobot web interface.
  2. Navigate: Go to Customization > Computed Fields or Custom Links.
  3. Create Malicious Template:
    • For Secret Exposure, create a computed field with the following Jinja2 template:
      {% for secret in secrets.all() %}
      {{ secret.name }}: {{ secret.value }}
      {% endfor %}
      
    • For Data Manipulation, create a custom link with:
      {{ __import__('os').popen('nautobot-server shell --command "from dcim.models import Device; Device.objects.filter(name=\'target_device\').update(status=\'decommissioned\')"').read() }}
      
  4. Trigger: View any object (e.g., a device) that has this computed field or custom link assigned.
  5. Observe: The secrets will be displayed in the computed field, or the data modification will occur.

Note: The exact syntax may vary based on Nautobot's internal structure. Use {{ dir() }} or {{ config }} to explore available objects.

Blue Team (Defense & Detection)

Detection Steps:

  1. Audit Computed Fields and Custom Links: Regularly review all computed fields and custom links for suspicious Jinja2 syntax, especially those containing __import__, os., subprocess, or direct access to secrets.
  2. Monitor Logs: Look for unusual template rendering errors or access to sensitive objects.
  3. Honeypot: Create a fake secret with a unique value and monitor for its exposure in logs or network traffic.

Mitigation Steps:

  1. Patch Immediately: Upgrade to Nautobot 1.6.32 or 2.4.10.
  2. Restrict Permissions: Limit the ability to create/edit computed fields and custom links to only highly trusted administrators.
  3. Network Segmentation: Ensure Nautobot is not directly accessible from the internet.
  4. Web Application Firewall (WAF): Deploy a WAF with rules to detect SSTI payloads (e.g., {{, {%, __import__).

Indicators of Compromise (IOCs)

  • Log Entries: Template rendering errors containing jinja2.exceptions.UndefinedError or jinja2.exceptions.SecurityError (if sandbox is partially enabled).
  • Network Traffic: Outbound connections from the Nautobot server to unexpected destinations (if the attacker uses os.popen to exfiltrate data).
  • File System: Unexpected files created in the Nautobot media or temporary directories.
  • Database: Unauthorized changes to objects (e.g., device status, IP addresses) that cannot be attributed to legitimate users.
  • Secrets Exposure: Secrets appearing in computed field outputs or in HTTP responses where they should not be.

Detection Engineering

YARA Rule

rule CVE_2025_49142_Jinja2_SSTI {
    meta:
        description = "Detects malicious Jinja2 templates targeting Nautobot CVE-2025-49142"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-49142"
    strings:
        $ssti1 = /{{.*__import__.*}}/
        $ssti2 = /{{.*os\..*}}/
        $ssti3 = /{{.*subprocess.*}}/
        $ssti4 = /{{.*secrets\..*}}/
        $ssti5 = /{%\s*for.*secrets.*%}/
    condition:
        any of them
}

Sigma Rule

title: Nautobot Jinja2 SSTI Exploitation Attempt
id: 8a4b3c2d-1e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects attempts to exploit CVE-2025-49142 via malicious Jinja2 templates in Nautobot logs.
author: Valters IT
date: 2025-04-10
logsource:
    category: application
    product: nautobot
detection:
    selection:
        EventID: 1000  # Example: Nautobot template rendering event
        Message|contains:
            - '__import__'
            - 'os.popen'
            - 'secrets.all'
            - 'subprocess'
    condition: selection
falsepositives:
    - Legitimate use of Jinja2 filters that may contain similar strings (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"Nautobot CVE-2025-49142 SSTI Payload in Request"; flow:to_server,established; content:"POST"; http_method; content:"/api/"; http_uri; pcre:"/{{.*(?:__import__|os\.|subprocess|secrets\.).*}}/"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Patch: Upgrade to Nautobot version 1.6.32 or 2.4.10 immediately.
  2. Restrict Access: If patching is not possible, revoke permissions for creating/editing computed fields and custom links from all non-administrative users.
  3. Audit: Review all existing computed fields and custom links for malicious content. Remove any suspicious entries.

Long-Term Measures:

  1. Principle of Least Privilege: Ensure that only necessary users have permissions to modify templating features.
  2. Input Validation: Implement strict validation and sanitization of Jinja2 templates before rendering.
  3. Sandboxing: Use a properly configured SandboxedEnvironment in Jinja2 to restrict access to dangerous functions.
  4. Monitoring: Continuously monitor logs for template rendering anomalies.
  5. Security Training: Educate administrators about the risks of SSTI and secure coding practices.

Valters IT
Securing Your Digital Infrastructure

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-49142/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.