MEDIUM 5.4

CVE-2026-40082: Cacti Session Fixation Vulnerability in Versions 1.2.30 and Earlier

Cacti, a widely-deployed open source monitoring and management framework, contains a session fixation vulnerability in its login process. When users authenticate, the application fails to rotate the session identifier, allowing an attacker to potentially hijack authenticated sessions through same-site attack vectors. The flaw exists in versions 1.2.30 and earlier; version 1.2.31 and later address it. While the session cookie itself is well-configured with security flags (httpOnly, Strict SameSite, secure for HTTPS), the missing session ID regeneration leaves a window for exploitation during the critical authentication moment.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.4 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Weaknesses (CWE)
CWE-384
Affected products
1 configuration(s)
Published / Modified
2026-06-25 / 2026-06-29

NVD description (verbatim)

Cacti is an open source performance and fault management framework. Versions 1.2.30 and prior have missing session_regenerate_id() after login, leading to Session Fixation. session_regenerate_id() is NOT called after successful login. The login flow at auth_login.php:203-207 directly sets $_SESSION[SESS_USER_ID] without rotating the session ID. The session cookie configuration is otherwise good (httponly=true, samesite=Strict, secure=true for HTTPS at include/global.php:513-537), but these do not prevent session fixation via same-site vectors. This issue has been fixed in version 1.2.31.

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability stems from inadequate session management during authentication. In Cacti versions 1.2.30 and prior, the login handler (auth_login.php lines 203-207) sets the user session variable directly into $_SESSION[SESS_USER_ID] without calling session_regenerate_id(). This standard PHP function rotates the session identifier upon successful authentication, breaking the association between any pre-authentication session ID an attacker might have crafted and the authenticated user. The session cookie configuration at include/global.php lines 513-537 correctly implements httpOnly, SameSite=Strict, and secure flags for HTTPS contexts, but these defensive measures do not compensate for the absence of session ID rotation. Same-site attack vectors—such as tricking a user into visiting an attacker-controlled page within the same domain context, or exploiting certain cross-origin POST scenarios—can still succeed in fixing a session before the user logs in, then leveraging that fixed session post-authentication.

Business impact

This vulnerability enables attackers to maintain persistent, authenticated access to Cacti instances without knowledge of user credentials. Since Cacti is typically used for critical infrastructure monitoring and performance management, a hijacked administrative session could allow unauthorized access to network visibility, performance data, and potentially configuration changes. The impact is moderate (CVSS 5.4) because exploitation requires user interaction and the attack surface is restricted to users on the same site origin or leveraging same-site vectors. However, in multi-tenant or shared-hosting scenarios, or where Cacti monitors sensitive systems, the ability to impersonate authenticated users poses meaningful confidentiality and integrity risks.

Affected systems

Cacti versions 1.2.30 and earlier are vulnerable. Organizations running Cacti deployments should audit their current version against this baseline. Version 1.2.31 and later contain the remediation. The vulnerability does not appear on the CISA Known Exploited Vulnerabilities (KEV) catalog, suggesting active exploitation in the wild has not yet been reported or widely disclosed.

Exploitability

Exploitation requires user interaction (CVSS:AC:L/UI:R) and network access, but no privileged precondition. An attacker must socially engineer or trick a legitimate Cacti user into visiting a malicious page or performing an action that allows the attacker to pre-set a session cookie, then capture that session after the user authenticates. The attack is not trivial—it demands coordination and timing—but is feasible, particularly against users in less-security-aware environments. The absence from the KEV catalog suggests this attack pattern has not yet been operationalized at scale by known threat actors.

Remediation

Upgrade to Cacti version 1.2.31 or later immediately. This version includes the session_regenerate_id() call in the authentication flow, ensuring that upon successful login, the session identifier is rotated, invalidating any pre-authentication session fixation attempts. Organizations unable to upgrade immediately should implement network-level mitigations: enforce strict access controls to Cacti administrative interfaces, restrict Cacti to authenticated corporate networks or VPNs, and monitor for suspicious session behavior or multiple concurrent sessions from the same user.

Patch guidance

Verify the current Cacti version in your environment. Access the administrative interface, check the version number (usually visible in the footer or via the status page), or query the database schema version if available. Review the vendor's official release notes for version 1.2.31 to confirm it addresses CVE-2026-40082. Plan a maintenance window to upgrade, as Cacti may require brief service downtime. Test the upgrade in a non-production environment first if your deployment is critical. After patching, verify login functionality and monitor for any session-related anomalies during and after the rollout.

Detection guidance

Monitor Cacti logs for authentication events and session creation patterns. Alert on: multiple failed login attempts followed by successful authentication from different IP addresses or user-agents using the same session, sudden session activity spikes, or sessions that survive longer than expected authentication windows. Implement passive monitoring of session identifiers before and after login events—a session ID change post-authentication indicates proper remediation. In a forensic context, examine web server access logs and Cacti audit logs for evidence of session fixation attempts (e.g., crafted session IDs or anomalous session timing). If you detect suspicious activity, check the Cacti version and review any unauthorized configuration changes or data access.

Why prioritize this

Cacti is a foundational monitoring tool in many IT environments, often used to observe critical infrastructure. While the CVSS score is moderate (5.4) and exploitation requires user interaction, the potential for unauthorized administrative access to a system that sees and controls network visibility makes this a notable concern. Prioritization should reflect your reliance on Cacti: if it monitors business-critical systems, treat this as a higher priority. The availability of a tested patch (1.2.31) and the absence of active exploits provide a narrow window to upgrade before threat actors operationalize the flaw.

Risk score, explained

CVSS 3.1 score of 5.4 (MEDIUM) reflects a network-accessible vulnerability with low attack complexity and moderate impact on confidentiality and integrity (partial unauthorized access and potential modification). The requirement for user interaction (UI:R) and the constraint of same-site or cross-origin attack vectors prevent a higher score. The rating appropriately captures that this is a real risk requiring action, but not an emergency threatening all Cacti users immediately. Your organizational risk may be higher if Cacti is exposed to untrusted networks or if session hijacking would grant access to highly sensitive monitoring data.

Frequently asked questions

How does session fixation differ from session hijacking, and is Cacti vulnerable to both?

Session hijacking involves stealing or guessing a valid session ID after it has been issued to a legitimate user. Session fixation is an attack where the attacker sets a known session ID before authentication and waits for the user to log in with that same ID. Cacti is vulnerable to session fixation (CVE-2026-40082) because it does not rotate the session ID at login. It is vulnerable to session hijacking only to the degree that any web application is—good cookie flags (httpOnly, Secure, SameSite) reduce but do not eliminate the risk. Session ID regeneration on login is the critical defense against fixation.

Do I need to force users to log out and back in after patching?

Not strictly necessary, but recommended. Applying the patch to Cacti will prevent future session fixation attacks for new logins. Existing sessions from users authenticated under the vulnerable version may still be at risk if they were pre-fixed. A controlled restart of the Cacti service will invalidate all sessions, forcing users to log back in and obtain a properly-rotated session ID. If you cannot restart immediately, monitor existing sessions closely and plan a logout/login cycle during the next maintenance window.

Why didn't the secure cookie flags (httpOnly, SameSite) prevent this attack?

Good cookie security flags reduce attack surface, but they do not defend against session fixation if the session ID itself is not rotated at login. httpOnly prevents JavaScript from stealing the cookie (defense against XSS-based hijacking), Secure prevents unencrypted transmission, and SameSite=Strict limits cross-site cookie sending. However, none of these prevent an attacker from setting a known session ID and then logging in with it—the ID remains valid throughout. Session ID regeneration on login is orthogonal to these protections and is the specific mitigation for fixation.

Is there a temporary workaround if I cannot patch immediately?

Full workarounds are limited by the nature of the flaw. Network-level mitigations reduce risk: restrict Cacti access to trusted networks or a VPN, disable or limit remote login, and monitor session logs for anomalies. Some organizations have patched the vulnerable code in auth_login.php by manually adding session_regenerate_id() calls if they have development resources, but this is error-prone and not recommended as a long-term solution. Upgrade to 1.2.31 as soon as feasible; it is the only reliable fix.

This analysis is provided for informational purposes to support vulnerability triage and remediation planning. It is not a substitute for vendor advisories, security testing, or professional security consultation. Organizations should verify patch applicability and compatibility in their specific environment before deployment. SEC.co makes no representation regarding the completeness or accuracy of any third-party security data and recommends cross-referencing official vendor documentation. Users and administrators are responsible for assessing risk in their own environments and determining appropriate remediation timelines based on their organizational risk tolerance and system criticality. Source: NVD (public-domain), retrieved 2026-08-04. Analysis generated by SEC.co (claude-haiku-4-5).