123456789_123456789_123456789_123456789_123456789_

Security Policy

Thank you for helping to keep the internet secure. Please read this before making a security report.

Supported Versions

We support the last two major versions and their latest minor.

For non-security bugs, see thePuma release support policy.

Version Supported
Latest release in 8.x ✅
Latest release in 7.x ✅
All other releases ❌

Our Threat Model

This determines what becomes a security advisory in Puma. We may make separate hardening fixes for things outside of this model.

Who do we defend against?

  1. Anyone who can reach the app port (the Unix, TCP or SSL bind that Puma serves the Rack app over). They can send any bytes, split up their data however they like, at any rate, with as many requests as they like on one connection or many. Their data is untrusted after it reaches your app. Puma must hold up its side of the Rack spec: build the Rack env accurately, call close on every response body, and keep attacker controlled values in your return value of app.call from breaking the HTTP response. If an app that relies on the Rack spec leaks data between requests or users because Puma didn't follow it, that's in scope.
  2. Anyone who can watch or change encrypted network traffic between the pumactl utility and a Puma control server.
  3. Anyone who can reach Puma's control server without the control token.

Who do we trust?

We don't defend against someone who already controls:

Bugs

Our features should work as designed. Bugs in our security features count in our threat model, even if they are optional. For example, if you turn on the optional control server and pumactl doesn't check a TLS certificate when it's supposed to, that's in scope.

What's a Denial of Service?

If you throw enough traffic at any web server, it eventually will fall over. So what's a DoS vulnerability in Puma?

Slow clients

Puma writes each response from one of its request threads. A client that reads a large response slowly keeps that thread busy until the response is sent, so a few slow readers can occupy every thread. This is a known limitation #3110), not a vulnerability. If untrusted clients can reach Puma, put it behind a reverse proxy that buffers responses.

A report about slow clients is in scope when it gets around a limit Puma does enforce, such as a client that stops reading and holds a thread for longer than the write timeout.

Logging

Where your logs go (stdout, stderr, files, pipes, log shippers) is part of your process setup, which we trust. Puma writes logs synchronously and on a best-effort basis. If the log destination fills up, returns errors, or stops reading, Puma may slow down or stop serving requests. While the log destination is healthy, logging must not crash Puma.

A DoS attack that uses logging must still meet the "outsized harm" rule in "What's a Denial of Service?" above.

Puma shouldn't deliberately log secrets such as the control token or private keys.

Request smuggling

When Puma and a proxy disagree about where one request ends and another begins, you can get a smuggling vuln.

A smuggling report to Puma needs all three of these:

  1. A real, popular, maintained proxy, set up in a realistic or valid way. Most reports to Puma fail this criterion because they propose hypothetical proxies which do not exist or would be doing something stupid. In that case, we might harden Puma against it, but it's not going to get an advisory from us.
  2. A reproduction against that proxy.
  3. Harm that crosses a security boundary, such as another user, cache, or connection shared with other users.

If Puma misreads an attacker's requests only for the attacker's own connection, that's not smuggling. We may fix it as a parser bug.

How we triage

We ask:

  1. Is it within the scope of our threat model?
  2. What's the CVSS 4.0 score?

The answers can lead to the following outcomes:

We don't publish advisories for unreleased code on main.

Reporting a Vulnerability

Report on Github.

AI reports are welcome.

Rejected out-scope reports can be filed as public issues or PRs, but we will probably do that for you.

You'll help us most if you include Puma, Ruby, and OS versions, the config, a runnable reproduction, and, for smuggling, the proxy name, version and config.