CVE-2026-40080 Cacti: Open Redirect via HTTP_REFERER substring check in auth_login_redirect
Attackers can redirect users to malicious sites after login if referer-based redirection is enabled, bypassing URL validation.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-40080?
CVE-2026-40080 is a medium-severity vulnerability in Cacti Cacti, published on 25 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Cacti is an open source performance and fault management framework. Versions 1.2.30 and prior are vulnerable to Open Redirect through a substring check rather than a host check at str_contains($referer, CACTI_PATH_URL). When the user's login_opts == '1' (redirect to referer after login), the function used $_SERVER['HTTP_REFERER'] directly. An attacker could craft a referer such as https://evil.com/cacti/. Where CACTI_PATH_URL is /cacti/, the substring matches and the user is redirected to evil.com after login. The pre-existing validate_redirect_url() helper at lib/html_utility.php performed proper validation but was not invoked from auth_login_redirect(). This issue has been fixed in version 1.2.31.
Weakness: CWE-601
Which versions are affected by CVE-2026-40080?
It affects 1 product.
Products include Cacti Cacti.
How do I fix CVE-2026-40080?
Upgrade to a fixed version.
Is CVE-2026-40080 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40080 exists.
Other vulnerabilities in Cacti Cacti
- CVE-2022-46169 Cacti Command Injection
- CVE-2026-39893 Cacti: Pre-authentication SQL injection via rfilter RLIKE clause in graph_view.php
- CVE-2026-39938 Cacti: Unauthenticated RCE on Graph Image
- CVE-2026-39955 Cacti has Pre-Authentication SQL Injection via unanchored FILTER_VALIDATE_REGEXP in graph_view.php
- CVE-2023-39361 Unauthenticated SQL Injection in graph_view.php in Cacti
Sources
Also known as DEBIAN-CVE-2026-40080, GHSA-6gr7-53g8-vchq, UBUNTU-CVE-2026-40080.