CVE-2024-24752 Bref Uploaded Files Not Deleted in Event-Driven Functions

Medium 6.5 Published Updated

Attackers can exhaust Lambda disk space by sending multiple multipart requests, causing denial of service in Bref serverless PHP applications.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-24752?

CVE-2024-24752 is a medium-severity denial of service vulnerability in brefphp bref, published on 1 Feb 2024. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Bref enable serverless PHP on AWS Lambda. When Bref is used with the Event-Driven Function runtime and the handler is a `RequestHandlerInterface`, then the Lambda event is converted to a PSR7 object. During the conversion process, if the request is a MultiPart, each part is parsed and for each which contains a file, it is extracted and saved in `/tmp` with a random filename starting with `bref_upload_`. The flow mimics what plain PHP does but it does not delete the temporary files when the request has been processed. An attacker could fill the Lambda instance disk by performing multiple MultiPart requests containing files. This vulnerability is patched in 2.1.13.

Weakness: CWE-770, CWE-400

Which versions are affected by CVE-2024-24752?

2 open source packages ship an affected version, including bref/bref. It affects 1 product.

PackageAffectedFixed in
bref/bref PackagistAll versions2.1.13
bref/bref PackagistAll versions2.1.13

Products include Mnapoli Bref.

How do I fix CVE-2024-24752?

Upgrade bref/bref to 2.1.13 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2024-24752 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-24752 exists.

Sources

Also known as GHSA-x4hh-frx8-98r5.

Is CVE-2024-24752 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free