Template injection in NetBox custom links leaks session cookies
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Information disclosure, Cross-site scripting
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-668, CWE-79 and the CVSS impact.
Summary
NetBox versions from 2.9.5 before 4.7.0 contain a server-side template injection flaw in custom link templates (CWE-668). The Jinja2 template context exposes the raw Django HttpRequest object, and an img src URL bypasses the clean_html sanitizer. A low-privileged user with the "Can add custom links" permission can steal the session cookies and API tokens of other users when a privileged user views the object, enabling full account takeover.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| netbox-community | netbox | 2.9.5 to before 4.7.0 | 4.7.0 | Patch available | CNA |
- netbox Vendornetbox-community Affected 2.9.5 to before 4.7.0 Fixed in 4.7.0 Patch available CNA
Remediation
Upgrade NetBox to version 4.7.0.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
- Fix · CNA netbox (netbox-community) Fixed in 4.7.0
Vendor assessments
Timeline
- 2026-10-06 Threatist record created from CVE-2026-104073
- 2026-10-07 Alias added: GHSA-hwq6-cq8c-9m9m
- 2026-10-07 CISA SSVC decision points changed
- 2026-10-07 Priority changed: MEDIUM → LOW
- 2026-10-07 Affected versions changed · Red Hat
- 2026-10-07 CVSS score added · Red Hat
References
Patch 1
Other 2
More netbox-community vulnerabilities
- TI-2026-39558 Deserialization of untrusted data in netbox-community devicetype-library CVSS 3.1CRITICAL 9.6
- TI-2026-23330 NetBox 4.3.5 - 4.5.4 RCE via RenderTemplateMixin CVSS 4.0HIGH 8.7
- TI-2026-39924 Code injection in netbox-community devicetype-library CVSS 3.1MEDIUM 6.5
- TI-2026-58964 NetBox through 4.7.0 Credential Disclosure via REST and GraphQL APIs CVSS 4.0HIGH 7.1
- TI-2026-84457 Broken access control in NetBox bulk component creation CVSS 4.0MEDIUM 5.3
- TI-2026-39685 Uncontrolled search path in netbox-community devicetype-library CVSS 3.1HIGH 8.8
Sources
- CVE-2026-104073 · CVE Program
- CVE-2026-104073 · NVD
- FIRST EPSS
- GHSA-hwq6-cq8c-9m9m · GitHub Advisory Database · CC BY 4.0
- CVE-2026-104073 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences