Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as low-privileged user with custom-link permission
-
DeliveryCraft custom link template embedding request.COOKIES['sessionid'] in img src
-
ExploitPrivileged user views affected object
-
ExecutionBrowser auto-loads image, exfiltrating session cookie
-
ImpactReplay stolen credential for full account takeover
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Resource sphere isolation
MITRE ATT&CK
1 technique across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an authenticated NetBox account holding the 'Can add custom links' permission (PR:L) - not available to anonymous or default read-only users. Exploitation additionally requires a higher-privileged victim to passively view an object of the type the malicious custom link is attached to (UI:P); the credential theft does not fire until that view occurs. Affected versions are NetBox 2.9.5 up to (but not including) 4.7.0; the vulnerability stems from the full Django HttpRequest/WSGI object being exposed to the Jinja2 custom-link context, letting request.COOKIES['sessionid'] and API tokens be read and smuggled through an <img src> URL that bypasses the clean_html sanitizer. Limiting factors: the attacker needs the delegated custom-link permission, a privileged user must trigger the payload, and upgrading to 4.7.0 (which exposes only a sanitized request subset) fully removes the sensitive attributes. |
| Impact | This is a credible but conditional risk, not a drop-everything emergency. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:P/VC:H) tells a coherent story that matches the description: network-reachable, low attack complexity, but requiring low-level authentication (PR:L - a user holding the 'Can add custom links' permission) and passive user interaction (UI:P - a privileged victim must view an affected object before the planted template fires). Those two gating factors are the main thing that holds the score to 6.9 (Medium) despite a High confidentiality impact and full-account-takeover outcome. Confidentiality is correctly rated High (session cookies and API tokens are stolen), while the subsequent-system SC:L/SI:L reflects that the hijacked account then enables further access. No EPSS score, SSVC decision, or KEV entry is provided in the input, so exploitation probability cannot be quantified and there is no evidence of active exploitation. No public exploit was identified in the provided data. The weakest link in the risk model is the insider/low-privilege prerequisite combined with needing a higher-privileged user to trigger it - this is a privilege-escalation/credential-theft chain rather than a remote-unauthenticated RCE, so prioritize patching where custom-link permissions are delegated to semi-trusted users. Note the provided vector is CVSS 4.0 only; no CVSS 3.1 vector was supplied for cross-comparison. |
| Exploit ScenarioDerived | A low-privileged NetBox user who has been granted the 'Can add custom links' permission creates a custom link whose Jinja2 template embeds request.COOKIES['sessionid'] (or a user's API token) inside an <img src> URL pointing to an attacker-controlled host. When an administrator or other privileged user later views an object of the targeted type, the browser auto-loads the image and silently exfiltrates the victim's live session cookie, which the attacker replays for full account takeover. No public proof-of-concept was identified in the provided data, but the vendor fix and test cases describe the exact exploitation path. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 06, 2026
Session cookie and API token theft in NetBox versions 2.9.5 through 4.6.x lets an authenticated user holding the "Can add custom links" permission exfiltrate the credentials of higher-privileged users who merely view an affected object. The flaw exposes the raw Django HttpRequest object to the Jinja2 custom-link template context, so an attacker can embed request.COOKIES['sessionid'] or a victim's API token inside an <img src> URL that slips past the clean_html sanitizer and auto-transmits to an attacker-controlled host when a privileged user opens the page, enabling full account takeover. Exploitation is conditional: it requires a delegated custom-link permission (PR:L) and a privileged victim to passively trigger the payload (UI:P), and no public exploit has been identified at time of analysis; upgrading to NetBox 4.7.0, which substitutes a sanitized request subset, removes the exposure entirely.
RemediationAI
The primary fix is to upgrade to NetBox v4.7.0, which replaces the raw WSGI request in the custom-link and webhook Jinja2 contexts with a sanitized subset (request.id, path, path_info, method, GET and username), eliminating access to cookies, headers and session state; this is a Vendor-released patch: NetBox v4.7.0, delivered via https://github.com/netbox-community/netbox/pull/22616 (tracked in issue https://github.com/netbox-community/netbox/issues/22607). If upgrading immediately is not possible, the most effective compensating control is to revoke or tightly audit the "Can add custom links" permission, since the attack cannot start without it - removing it from non-administrative accounts closes the vector but disables legitimate custom-link authoring for those users. Additionally, rotate all session IDs and API tokens issued before remediation, because any credentials exfiltrated through an <img src> payload remain valid after patching; note that session rotation forcibly logs out active users, and API token rotation breaks any integrations using the old tokens. Because the exfiltration fires only when a privileged user views an affected object, there is no reliable server-side block for the outbound request besides output sanitization that already failed here, so patching remains the durable remedy. Validate the fix in staging by confirming that a test custom link referencing request.COOKIES or request.META renders empty, matching the sanitization tests shipped with v4.7.0.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
NetBox uses Jinja2 to render administrator-defined "custom links" attached to objects, and prior to 4.7.0 it injected the full Django WSGI request into that rendering context via the custom_links template tag (django.template.context_processors.request). Because the request object carries cookies, headers, session state and META data, a template author could reach request.COOKIES['sessionid'], the session token, or a user's API token directly from the template expression - a server-side template injection pattern in which data access, not code injection, is the abuse primitive. CWE-668 (Exposure of Resource to Wrong Sphere) captures the root cause: the entire request object was placed in a rendering sphere that only needed a narrow, read-only subset. The stolen value is embedded in an <img src="https://attacker/..."> attribute, which survives the clean_html sanitizer that NetBox applies to custom link output, so the browser issues the outbound request and exfiltrates the secret without any user interaction beyond viewing the object. The upstream fix in PR 22616 replaces the raw request with get_safe_request_context(), a utility that exposes only request.id, request.path, request.path_info, request.method, request.GET and request.user (username), and it also hardens the webhook Jinja2 context the same way; the accompanying test class asserts that COOKIES, META and headers are no longer reachable while benign attributes remain for backward compatibility.
Know when Netbox gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:N/VA:N/SC:L/SI:L/SA:N
Attacker needs the delegated 'Can add custom links' permission (PR:L) and a privileged victim to render the payload (UI:R); stolen credentials cross a privilege boundary (S:C) yielding High confidentiality and Low integrity via account takeover.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
NetBox versions 2.9.5 before 4.7.0 contain a server-side template injection vulnerability that allows a low-privileged user with the "Can add custom links" permission to steal session cookies and API tokens of other users by exposing the raw Django HttpRequest object to the Jinja2 template context. Attackers can craft a custom link template embedding request.COOKIES['sessionid'] or a user's API token into an img src URL, which bypasses the clean_html sanitizer and auto-exfiltrates the victim's credentials to an attacker-controlled host when a privileged user views the object, enabling full account takeover.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
A vulnerability in Netbox v3.5.1 allows unauthenticated attackers to execute queries against the GraphQL database, grant
Remote code execution in NetBox 4.3.5-4.5.4 allows authenticated users with exporttemplate or configtemplate permissions
Credential exposure in NetBox through 4.7.0 allows any authenticated user with only view-level permissions to retrieve p
A cross-site scripting vulnerability in Netbox Community 4.1.7 (CVSS 7.1). Risk factors: public PoC available.
Netbox Community v4.1.7 and fixed in v.4.2.2 is vulnerable to Cross Site Scripting (XSS) via the RSS feed widget.
In Netbox Community 4.1.7, the login page is vulnerable to cross-site scripting (XSS), which allows a privileged, authen
In Netbox Community 4.1.7, once authenticated, Configuration History > Add`is vulnerable to cross-site scripting (XSS) d
A cross-site scripting (XSS) vulnerability in netbox v4.0.3 allows attackers to execute arbitrary web scripts or HTML vi
A cross-site scripting (XSS) vulnerability in netbox v4.0.3 allows attackers to execute arbitrary web scripts or HTML vi
A cross-site scripting (XSS) vulnerability in netbox v4.0.3 allows attackers to execute arbitrary web scripts or HTML vi
A cross-site scripting (XSS) vulnerability in netbox v4.0.3 allows attackers to execute arbitrary web scripts or HTML vi
A cross-site scripting (XSS) vulnerability in netbox v4.0.3 allows attackers to execute arbitrary web scripts or HTML vi
EUVD-2026-93660
GHSA-hwq6-cq8c-9m9m
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB