Skip to content

fix: protect regex from redos#38

Merged
Marsup merged 1 commit intomasterfrom
fix/regexp-redos
Apr 2, 2026
Merged

fix: protect regex from redos#38
Marsup merged 1 commit intomasterfrom
fix/regexp-redos

Conversation

@Marsup
Copy link
Copy Markdown
Contributor

@Marsup Marsup commented Apr 2, 2026

No description provided.

@Marsup Marsup added this to the 6.0.1 milestone Apr 2, 2026
@Marsup Marsup self-assigned this Apr 2, 2026
@Marsup Marsup added the bug Bug or defect label Apr 2, 2026
@Marsup Marsup merged commit ac9a2de into master Apr 2, 2026
10 checks passed
gsoldevila added a commit to elastic/kibana that referenced this pull request Apr 21, 2026
…ent (#264077)

## Summary

Fixes CVE-2026-35213 — a Regular Expression Denial of Service (ReDoS)
vulnerability in `@hapi/content@6.0.0` which is a transitive dependency
of `@hapi/hapi` (Kibana's HTTP server framework).

Upgrades `@hapi/hapi` from `21.4.4` to `21.4.8`, which cascades into
patching the full vulnerable dependency chain:

| Package | Before | After | Role |
|---|---|---|---|
| `@hapi/hapi` | `21.4.4` | `21.4.8` | Direct dependency (HTTP server) |
| `@hapi/subtext` | `8.1.1` | `8.1.2` | Request body parsing (requires
`@hapi/content ^6.0.1`) |
| `@hapi/pez` | `6.1.0` | `6.1.1` | Multipart form parsing (requires
`@hapi/content ^6.0.1`) |
| `@hapi/content` | `6.0.0` | `6.0.1` | **Vulnerable package — contains
the fix** |

### Vulnerability Details

`@hapi/content@6.0.0` has a ReDoS vulnerability in its `Content-Type`
header parsing regex. A maliciously crafted `Content-Type` header sent
to any Kibana HTTP endpoint could cause catastrophic backtracking,
exhausting CPU and causing a denial of service. No authentication is
required to exploit this.

- **CVE:** CVE-2026-35213
- **Severity:** High
- **Fix:** Upgrade `@hapi/content` to `6.0.1` ([upstream
commit](hapijs/content@ac9a2de),
[upstream PR](hapijs/content#38))
- **Tracking issue:** elastic/security#9673

### Impact Assessment

All network-accessible Kibana deployments running `@hapi/content@6.0.0`
are potentially affected. The exploit requires no privileges and targets
the HTTP layer.

## Test plan

- [ ] CI passes — confirms the hapi version bump has no regressions in
Kibana's HTTP layer, routing, and request handling
- [ ] Confirm `yarn.lock` no longer contains `@hapi/content@6.0.0` after
bootstrap


Made with [Cursor](https://cursor.com)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bug or defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant