# CVE-2024-24753: Bref Multiple Value Headers Not Supported in ApiGatewayFormatV2

> Bref library drops duplicate security headers, allowing attackers to bypass protections like Content-Security-Policy in AWS Lambda applications.

- **Severity:** Medium 4.8 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 1 Feb 2024
- **Updated:** 17 Jun 2025
- **Also known as:** GHSA-99f9-gv72-fw9r

## What is CVE-2024-24753?

CVE-2024-24753 is a medium-severity vulnerability in brefphp bref, published on 1 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Bref enable serverless PHP on AWS Lambda. When Bref is used in combination with an API Gateway with the v2 format, it does not handle multiple values headers. If PHP generates a response with two headers having the same key but different values only the latest one is kept. If an application relies on multiple headers with the same key being set for security reasons, then Bref would lower the application security. For example, if an application sets multiple `Content-Security-Policy` headers, then Bref would just reflect the latest one. This vulnerability is patched in 2.1.13.

Weakness: CWE-436 (Interpretation Conflict)

## Which versions are affected by CVE-2024-24753?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `bref/bref` | Packagist | All versions | 2.1.13 |
| `bref/bref` | Packagist | All versions | 2.1.13 |

Products: Mnapoli Bref.

## How do I fix CVE-2024-24753?

Upgrade bref/bref to 2.1.13 or later.

## Is CVE-2024-24753 being exploited?

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

## Other vulnerabilities in brefphp bref

- [CVE-2024-24752](https://insights.sbomify.com/CVE-2024-24752/): Bref Uploaded Files Not Deleted in Event-Driven Functions (medium 6.5)
- [CVE-2024-29186](https://insights.sbomify.com/CVE-2024-29186/): Slow String Operations via MultiPart Requests in Event-Driven Functions (medium 5.3)
- [CVE-2024-24754](https://insights.sbomify.com/CVE-2024-24754/): Bref Body Parsing Inconsistency in Event-Driven Functions (low 3.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-24753 and fix it if it is affected.

What it is: CVE-2024-24753 is a medium-severity vulnerability in brefphp bref, published on 1 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-24753 exists.

Affected packages and fixed versions:
- bref/bref (Packagist): affected all versions; fixed in 2.1.13
- bref/bref (Packagist): affected all versions; fixed in 2.1.13

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-24753/ (Markdown: https://insights.sbomify.com/CVE-2024-24753/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-24753
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-24753
- OSV: https://osv.dev/vulnerability/CVE-2024-24753

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-24753/
Summaries are generated and may contain mistakes; the official description above is the record.
