# CVE-2024-28103: Action Pack is missing security headers on non-HTML responses


- **Severity:** Medium 5.4 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 4 Jun 2024
- **Updated:** 6 Dec 2024
- **Also known as:** BIT-rails-2024-28103, DEBIAN-CVE-2024-28103, GHSA-fwhr-88qx-h9g7, OESA-2024-1708, OESA-2024-1709, OESA-2024-1710, SUSE-SU-2024:1973-1, SUSE-SU-2024:1974-1, SUSE-SU-2024:1986-1, SUSE-SU-2024:2140-1, UBUNTU-CVE-2024-28103, openSUSE-SU-2024:14110-1

## What is CVE-2024-28103?

CVE-2024-28103 is a medium-severity vulnerability in Rubyonrails Rails, published on 4 Jun 2024. 

### Official description

Action Pack is a framework for handling and responding to web requests. Since 6.1.0, the application configurable Permissions-Policy is only served on responses with an HTML related Content-Type. This vulnerability is fixed in  6.1.7.8, 7.0.8.2, and 7.1.3.3.

Weakness: CWE-20 (Improper Input Validation)

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

9 open source packages ship an affected version, including rails and actionpack. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `rails` | Bitnami | From 6.1.0 | 6.1.8, 7.0.9, 7.1.4 |
| `actionpack` | RubyGems | From 6.1.0 | 6.1.7.8 |
| `actionpack` | RubyGems | From 6.1.0 | 6.1.7.8 |
| `actionpack` | RubyGems | From 7.0.0 | 7.0.8.4 |
| `actionpack` | RubyGems | From 7.0.0 | 7.0.8.4 |
| `actionpack` | RubyGems | From 7.1.0 | 7.1.3.4 |
| `actionpack` | RubyGems | From 7.1.0 | 7.1.3.4 |
| `actionpack` | RubyGems | From 7.2.0.beta1 | 7.2.0.beta2 |
| `actionpack` | RubyGems | From 7.2.0.beta1 | 7.2.0.beta2 |
| `rmt-server` | SUSE:Enterprise Storage 7.1 | All versions | 2.17-150300.3.37.1 |
| `rmt-server` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 2.17-150200.3.45.1 |
| `rmt-server` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 2.17-150300.3.37.1 |
| `rmt-server` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 2.17-150400.3.25.1 |
| `rmt-server` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 2.17-150400.3.25.1 |
| `rmt-server` | SUSE:Linux Enterprise Module for Public Cloud 15 SP2 | All versions | 2.17-150200.3.45.1 |
| `rmt-server` | SUSE:Linux Enterprise Module for Public Cloud 15 SP3 | All versions | 2.17-150300.3.37.1 |
| `rmt-server` | SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | All versions | 2.17-150400.3.25.1 |
| `rmt-server` | SUSE:Linux Enterprise Module for Public Cloud 15 SP5 | All versions | 2.17-150500.3.16.1 |
| `rmt-server` | SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | All versions | 2.17-150500.3.16.1 |
| `rmt-server` | SUSE:Linux Enterprise Module for Server Applications 15 SP5 | All versions | 2.17-150500.3.16.1 |
| `rmt-server` | SUSE:Linux Enterprise Module for Server Applications 15 SP6 | All versions | 2.17-150500.3.16.1 |
| `rmt-server` | SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 2.17-150200.3.45.1 |
| `rmt-server` | SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 2.17-150300.3.37.1 |
| `rmt-server` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 2.17-150400.3.25.1 |
| `rmt-server` | SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 2.17-150200.3.45.1 |
| `rmt-server` | SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 2.17-150300.3.37.1 |
| `rmt-server` | SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 2.17-150400.3.25.1 |
| `rmt-server` | SUSE:Manager Proxy 4.3 | All versions | 2.17-150400.3.25.1 |
| `rmt-server` | SUSE:Manager Server 4.3 | All versions | 2.17-150400.3.25.1 |
| `rmt-server` | openSUSE:Leap 15.5 | All versions | 2.17-150500.3.16.1 |
| `rmt-server` | openSUSE:Leap 15.6 | All versions | 2.17-150500.3.16.1 |
| `rmt-server` | openSUSE:Tumbleweed | All versions | 2.18-1.1 |

Products: Rubyonrails Rails.

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

Upgrade rails to a fixed version for your release line: 6.1.8, 7.0.9 or 7.1.4.

## Is CVE-2024-28103 being exploited?

There is no known exploitation of CVE-2024-28103 in the wild and no public exploit code.

## Other vulnerabilities in Rubyonrails Rails

- [CVE-2013-0277](https://insights.sbomify.com/CVE-2013-0277/): Active Record contains deserialization of arbitrary YAML (critical 10.0)
- [CVE-2017-17916](https://insights.sbomify.com/CVE-2017-17916/): SQL injection in n/a (high 8.1)
- [CVE-2017-17917](https://insights.sbomify.com/CVE-2017-17917/): SQL injection in n/a (high 8.1)
- [CVE-2026-33195](https://insights.sbomify.com/CVE-2026-33195/): Rails Active Storage has possible Path Traversal in DiskService (high 8.0)
- [CVE-2024-26142](https://insights.sbomify.com/CVE-2024-26142/): Rails possible ReDoS vulnerability in Accept header parsing in Action Dispatch (high 7.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2024-28103 is a medium-severity vulnerability in Rubyonrails Rails, published on 4 Jun 2024. 
Exploitation: There is no known exploitation of CVE-2024-28103 in the wild and no public exploit code.

Affected packages and fixed versions:
- rails (Bitnami): affected from 6.1.0; fixed in 6.1.8, 7.0.9, 7.1.4
- actionpack (RubyGems): affected from 6.1.0; fixed in 6.1.7.8
- actionpack (RubyGems): affected from 6.1.0; fixed in 6.1.7.8
- actionpack (RubyGems): affected from 7.0.0; fixed in 7.0.8.4
- actionpack (RubyGems): affected from 7.0.0; fixed in 7.0.8.4
- actionpack (RubyGems): affected from 7.1.0; fixed in 7.1.3.4
- actionpack (RubyGems): affected from 7.1.0; fixed in 7.1.3.4
- actionpack (RubyGems): affected from 7.2.0.beta1; fixed in 7.2.0.beta2
- actionpack (RubyGems): affected from 7.2.0.beta1; fixed in 7.2.0.beta2

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-28103/ (Markdown: https://insights.sbomify.com/CVE-2024-28103/index.md)
```

## Sources

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

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