Skip to content

Uncontrolled Recursion and Asymmetric Resource Consumption (Amplification) in media/file proxy

High
syuilo published GHSA-gq5q-c77c-v236 Dec 18, 2024

Package

misskey

Affected versions

<=2024.10.1
<=git+8b6d321a76877a422b268e77cf930be7d1967213

Patched versions

2024.11.0-alpha.3

Description

Summary

FileServerService (media proxy) in github.com/misskey-dev/misskey 2024.10.1 or earlier did not detect proxy loops, which allows remote actors to execute a self-propagating reflected/amplified distributed denial-of-service via a maliciously crafted note.

Details

FileServerService.prototype.proxyHandler did not check incoming requests are not coming from another proxy server.
An attacker can execute an amplified denial-of-service by sending a nested proxy request to the server and end the request with a malicious redirect back to another nested proxy request.
Leading to unbounded recursion until the original request is timed out.

[Detailed exploitation methodology is withheld]

Remediation

Upgrade to Misskey v2024.11.0 or later.

OR

Configure the reverse proxy to block requests to the proxy with an empty User-Agent header or one containing Misskey/. An attacker can not effectively modify the User-Agent header without making another request to the server.

Instances with external media proxy configured are also affected by this vulnerability. If you have an external media proxy, you should confirm both the internal AND external proxy are not vulnerable.

Impact

An unsophisticated attack (single IP, single instance) can lead to excessive CPU and gigabytes of memory usage and noticeable performance degradation while staying below the rate-limiting threshold.

A (currently unproven but realistic) well-orchestrated attack can lead to widespread outages across multiple instances.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:N/A:H

CVE ID

CVE-2024-49363

Credits