Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS13NGg2LTl3cnAtdjVqcc4AA74M
Malicious Long Unicode filenames may cause a Multiple Application-level Denial of Service
Important: Exploiting this vulnerability requires the attacker to have access to your Frigate instance, which means they could also just delete all of your recordings or perform any other action. If you have configured authentication in front of Frigate via a reverse proxy, then this vulnerability is not exploitable without first getting around your authentication method. For many obvious reasons in addition to this one, please don't expose your Frigate instance publicly without any kind of authentication.
Summary
When uploading a file or retrieving the filename, a user may intentionally use a large Unicode filename which would lead to a application-level denial of service. This is due to no limitation set on the length of the filename and the costy use of the Unicode normalization with the form NFKD under the hood of secure_filename()
.
I idenfied multiple vulnerable paths on blakeblackshear/frigate repository. In all of those paths, it was possible for a malicious user to send a filename equals to the output of : python3 -c "print('℀' * 1_000_000)"
which would reach the werkzeug secure_filename()
call , which in turn under the hood uses a compatibility Unicode normalization with NFKC/NFKD form. In sum, the latter call would be costly in matter of CPU resource and may lead to the application-level denial of service.
Vulnerable Paths
This user-provided value can reach a costly Unicode normalization operation.
Paths
This user-provided value can reach a costly Unicode normalization operation.
Paths
This user-provided value can reach a costly Unicode normalization operation.
Paths
This user-provided value can reach a costly Unicode normalization operation.
Paths
This user-provided value can reach a costly Unicode normalization operation.
Paths
This user-provided value can reach a costly Unicode normalization operation.
Paths
This user-provided value can reach a costly Unicode normalization operation.
Paths
Impact
- Application-level Denial of Service, the web app would hung undefinetly and not process any further request due to the use of the malicious payload.
Mitigation
- Limiting the length of the incoming filename, similar to this commit fix.
References
- Similar to CVE-2023-46695
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS13NGg2LTl3cnAtdjVqcc4AA74M
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: 7 months ago
Updated: 7 months ago
CVSS Score: 9.3
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:H
Identifiers: GHSA-w4h6-9wrp-v5jq, CVE-2024-32874
References:
- https://github.com/blakeblackshear/frigate/security/advisories/GHSA-w4h6-9wrp-v5jq
- https://github.com/blakeblackshear/frigate/blob/d7ae0eedf89e14f297093ac5c8042862034cbaeb/frigate/api/media.py#L1346C46-L1346C55
- https://github.com/blakeblackshear/frigate/blob/d7ae0eedf89e14f297093ac5c8042862034cbaeb/frigate/api/media.py#L408C33-L408C78
- https://github.com/blakeblackshear/frigate/blob/d7ae0eedf89e14f297093ac5c8042862034cbaeb/frigate/api/media.py#L646C25-L646C47
- https://github.com/blakeblackshear/frigate/blob/d7ae0eedf89e14f297093ac5c8042862034cbaeb/frigate/api/media.py#L684C9-L684C59
- https://github.com/blakeblackshear/frigate/blob/d7ae0eedf89e14f297093ac5c8042862034cbaeb/frigate/api/media.py#L705C42-L705C88
- https://github.com/blakeblackshear/frigate/blob/d7ae0eedf89e14f297093ac5c8042862034cbaeb/frigate/api/media.py#L728C38-L728C80
- https://nvd.nist.gov/vuln/detail/CVE-2024-32874
- https://github.com/blakeblackshear/frigate/commit/cc851555e4029647986dccc8b8ecf54afee31442
- https://github.com/advisories/GHSA-w4h6-9wrp-v5jq
Blast Radius: 4.4
Affected Packages
pypi:frigate
Dependent packages: 0Dependent repositories: 3
Downloads: 7,477 last month
Affected Version Ranges: < 0.13.2
Fixed in: 0.13.2
All affected versions: 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.6.1, 0.7.0
All unaffected versions: