Incorrect Regular Expression Affecting authentik-client package, versions [,2024.10.4.post1732236734)


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.04% (11th 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 Incorrect Regular Expression vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-AUTHENTIKCLIENT-8400755
  • published22 Nov 2024
  • disclosed21 Nov 2024
  • creditPontus Hanssen

Introduced: 21 Nov 2024

CVE-2024-52289  (opens in a new tab)
CWE-185  (opens in a new tab)

How to fix?

Upgrade authentik-client to version 2024.10.4.post1732236734 or higher.

Overview

authentik-client is an authentik

Affected versions of this package are vulnerable to Incorrect Regular Expression due to the insecure handling of OAuth2 redirect URIs, which are checked by RegEx comparison without proper escaping of special characters. An attacker can manipulate the validation process by registering a domain that closely resembles the intended domain, thus bypassing the validation checks.

Workaround

This vulnerability can be mitigated by ensuring that any wildcard characters in the OAuth2 provider configurations are escaped properly, for example replacing . with \.

PoC

Given a provider with the Redirect URIs set to https://foo.example.com, an attacker can register a domain fooaexample.com, and it will correctly pass validation.

References

CVSS Scores

version 4.0
version 3.1