Description
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.
Severity (CVSS)
| Base score | 6.9 |
|---|---|
| Severity | Medium |
| Version | CVSS 4.0 |
| Vector | 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 |
| Provided by | CNA |
Weaknesses
- CWE-668 — Exposure of Resource to Wrong Sphere
- CWE-79 — Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected products
| Vendor | Product | Versions |
|---|---|---|
| netbox-community | netbox | 2.9.5 to <4.7.0 |
References
- https://github.com/netbox-community/netbox/releases#release-v4.7.0 (release-notes)
- https://github.com/netbox-community/netbox/issues/22607 (issue-tracking)
- https://github.com/netbox-community/netbox/pull/22616 (patch)
- https://www.vulncheck.com/advisories/netbox-session-hijacking-via-custom-links (third-party-advisory)
Generated from the official CVE List on 07 Oct 2026 10:16 UTC.