NagVis / nagvis

Visualization addon for your open source monitoring core
http://nagvis.org/
GNU General Public License v2.0
113 stars 73 forks source link

Fix type juggling vulnerability #321

Closed Shortfinga closed 1 year ago

Shortfinga commented 1 year ago

PHP evaluates != a bit loose on the type. So "0000" == "0e5678" is true in PHP. An attacker could send a zeroed cookie_hash "0"*32 and only need an collision with a calculated hash beginning with 0e followed by only numbers.

In our tests (with auth.secret set to stable) a valid cookie is cmkadmin:58191275:00000000000000000000000000000000.

For a remote attacker this would have needed 58,191,275 guesses.