Skip to content
CSRF Write-up Intermediate

CVE-2021-27927: CSRF to RCE Chain in Zabbix

The authentication settings update form in Zabbix did not validate the anti-CSRF token, and parameters could be sent via GET. An attacker could trick a logged-in administrator into visiting a malicious page that changes the authentication method to LDAP, allowing the attacker to log in with their own LDAP credentials and then execute commands on the Zabbix server.

horizon3.ai

Published on horizon3.ai

Zabbix is an enterprise IT network and application monitoring solution. In a routine review of its source code, we discovered a CSRF (cross-site request forgery) vulnerability in the authentication component of the Zabbix UI.

The author, on horizon3.ai

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

Impact

An attacker could take over the Zabbix administrator account and execute arbitrary commands on the Zabbix server, and in certain configurations on monitored hosts; user interaction is required.

What the attacker needed

Victim is logged in as Zabbix admin; victim clicks a link; attacker-controlled LDAP server reachable

The fix

The vulnerability was fixed in Zabbix versions 4.0.28rc1, 5.0.8rc1, 5.2.4rc1, and 5.4.0alpha1.

How it was found

  1. Set up an attacker-controlled LDAP server reachable by the Zabbix application and create a user matching the Zabbix admin username.
  2. Host a malicious web page that contains a link with the forged GET request to update authentication settings, and automatically click it via JavaScript.
  3. Trick the Zabbix administrator into visiting the malicious page.
  4. The administrator's browser sends the forged request, which updates the authentication method to LDAP and sets the LDAP server details.
  5. Log in to Zabbix using the attacker's LDAP credentials.
  6. Use the Scripts feature to execute arbitrary commands on the Zabbix server.

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.

A CSRF attack tricks a logged-in user's browser into sending a request to a site they are logged into, without the user's knowledge. Here, the Zabbix authentication settings page did not check a security token, so an attacker could make the admin's browser change the login method to use the attacker's own LDAP server. Once that change was made, the attacker could log in as admin and run commands on the server.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.