CVE-2026-104073: NetBox 2.9.5 < 4.7.0 Session Hijacking via Custom Links

Published Oct 6, 2026
·
Updated

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 cleanhtml sanitizer and auto-exfiltrates the victim's credentials to an attacker-controlled host when a privileged user views the object, enabling full account takeover.

Affected Software

1 affected component
netbox Netbox>=2.9.5<4.7.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade NetBox to a version that resolves this vulnerability.

    Fixed in 4.7.0

Event History

Oct 6, 2026
CVE Published
via MITRE·06:50 PM
Data Sourced
via MITRE·06:50 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who can exploit this issue?

A low-privileged NetBox user who has the "Can add custom links" permission can create the malicious custom link. Exploitation then requires another user, potentially a privileged user, to view the affected object.

2

What credentials can be exposed if exploitation succeeds?

The malicious template can expose a viewing user's session cookie or API token to an attacker-controlled host. This can enable full account takeover of the affected user.

3

Are all NetBox deployments affected by default?

The issue requires a user to have permission to add custom links, so exploitation depends on that permission being assigned. A victim must also view an object containing the attacker-created custom link.

4

What should be done if upgrading cannot happen immediately?

Remove or restrict the "Can add custom links" permission for low-privileged users and review existing custom links for templates that reference request data, cookies, or external image URLs. Treat credentials for users who may have viewed suspicious links as potentially exposed.

5

How can administrators identify potential exploitation?

Review custom link templates for references such as request.COOKIES['sessionid'] or user API tokens, especially where values are embedded in an external img src URL. Also investigate attacker-controlled external hosts that may have received requests when users viewed NetBox objects.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203