Skip to content
Account takeover Write-up Intermediate

Client-Side Session Storage 101

Zabbix's client-side session storage did not validate the authenticity of session data, allowing attackers to forge session entries. This enabled bypassing SAML SSO authentication to gain administrator access and reconfiguring instances via the setup script.

blog.sonarsource.com

Published on blog.sonarsource.com

Zabbix is a very popular open-source monitoring platform used to collect, centralize and track metrics like CPU load and network traffic across entire infrastructures. It is very similar to solutions like Pandora FMS and Nagios.

The author, on blog.sonarsource.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The session handler stored data client-side in cookies and did not verify the signature of the session data when accessing fields other than the session ID.

Impact

On instances with SAML SSO enabled, attackers could bypass authentication and gain administrator privileges, and on any instance they could reconfigure the setup to point to a database under their control, potentially leading to remote code execution.

What the attacker needed

SAML SSO enabled (for CVE-2022-23131); Network access to the Zabbix Web Frontend

The fix

The vulnerabilities were fixed by adding a signature field to the SSO flow, using HMAC for cookie authentication, and restricting the setup process to super administrators.

How it was found

  1. Enable SAML SSO authentication on the Zabbix Web Frontend.
  2. Craft a session cookie containing a saml_data entry with a username_attribute set to a privileged user.
  3. Send a request to index_sso.php with the crafted cookie to be authenticated as that user.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Zabbix kept session information in cookies on the user's browser but did not properly check that the data had not been tampered with. An attacker could edit the cookie to pretend to be an administrator or to change the system's configuration.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.