CVE-2024-34340: Authentication Bypass when using using older password hashes

CVE-2024-34340 affects 44 listed versions of Cacti in the Dawnsentry catalogue.

9.1CVSS critical
Proof of concept publicexploitation
1%EPSS (next 30 days)
14 May 2024published

Affected products and versions

The versions in the Dawnsentry catalogue this CVE affects, judged from the vendor's own advisory where there is one, otherwise from the CVE record and NVD, as each version's own page says.

Cacti

44 of 50 listed versions are affected. Fixed in 1.2.27. The newest release, 1.2.32, is not affected.

1.2.26 1.2.25 1.2.24 1.2.23 1.2.22 1.2.21 1.2.20 1.2.19 1.2.18 1.1.38 1.1.36 1.1.27 1.1.25 1.1.17 1.1.15 1.1.13 1.1.12 1.0.0 0.8.8g 0.8.8f 0.8.8d 0.8.8c 0.8.8b 0.8.8a 0.8.8 0.8.7i 0.8.7h 0.8.7g 0.8.7f 0.8.7e 0.8.7d 0.8.7c 0.8.7b 0.6.8a 0.6.8 0.6.7 0.6.6 0.6.5 0.6.4 0.6.3 0.6.2 0.6.1 0.6 0.5

What it is

Cacti provides an operational monitoring and fault management framework. Prior to version 1.2.27, Cacti calls `compat_password_hash` when users set their password. `compat_password_hash` use `password_hash` if there is it, else use `md5`. When verifying password, it calls `compat_password_verify`. In `compat_password_verify`, `password_verify` is called if there is it, else use `md5`. `password_verify` and `password_hash` are supported on PHP < 5.5.0, following PHP manual. The vulnerability is in `compat_password_verify`. Md5-hashed user input is compared with correct password in database by `$md5 == $hash`. It is a loose comparison, not `===`. It is a type juggling vulnerability. Version 1.2.27 contains a patch for the issue.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N (NVD)

Published by GitHub on 14 May 2024. Last changed 17 June 2026.

Sources

Check one version you run: look CVE-2024-34340 up, or pick a product and version in the quick lookup.

Updated 2 December 2026.