Allocation of Resources Without Limits or Throttling Affecting litestar package, versions [,2.13.0)


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.06% (26th 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 Allocation of Resources Without Limits or Throttling vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-LITESTAR-8400286
  • published21 Nov 2024
  • disclosed20 Nov 2024
  • creditMarcel Hellkamp

Introduced: 20 Nov 2024

CVE-2024-52581  (opens in a new tab)
CWE-770  (opens in a new tab)

How to fix?

Upgrade litestar to version 2.13.0 or higher.

Overview

litestar is a Litestar - A production-ready, highly performant, extensible ASGI API Framework

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling due to the lack of size limits or size checks when reading the request body into memory via await self.body().

Note: All Litestar applications that process json, msgpack or form-data submission requests are affected

PoC

  1. Start an applications that accesses Request.json(), Request.msgpack() or Request.form() or uses an extractor that relies on those parsers internally

  2. end a large request with a matching content type. The actual content of the request does not matter.

  3. Server memory consumption will increase very quickly until memory (and swap) are exhausted.

CVSS Scores

version 4.0
version 3.1