Skip to content

fix: bump Envoy to v1.39.0 to patch DoS advisories and PRIORITY flood bypass - #4

Merged
shumkov merged 1 commit into
dashpay:masterfrom
shumkov:fix/bump-envoy-dos
Jul 26, 2026
Merged

fix: bump Envoy to v1.39.0 to patch DoS advisories and PRIORITY flood bypass#4
shumkov merged 1 commit into
dashpay:masterfrom
shumkov:fix/bump-envoy-dos

Conversation

@shumkov

@shumkov shumkov commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Bumps the base image from envoyproxy/envoy:v1.35.11 to envoyproxy/envoy:v1.39.0.

v1.35.11 predates Envoy's 2026-06-23 security batch of 15 advisories. v1.39.0 closes all of them, plus an HTTP/2 flood-protection bypass that was never backported to any patch line.

Denial of service / crash / memory exhaustion

  • HTTP/2 PRIORITY and WINDOW_UPDATE flood bypass (no CVE assigned, Fix PRIORITY flood bypass envoyproxy/envoy#45077): limits scaled with the cumulative count of streams ever opened, so an attacker churning streams inflated the budget without bound and never tripped the limit. Now scales with active streams and retires on close.
  • GHSA-p7c7-7c47-pwch (high): HTTP/3 QPACK blocked-decoding DoS
  • CVE-2026-48042 (high): stack overflow in destructor of highly nested JSON
  • CVE-2026-48044 (high): zstd RLE zip bomb, decompressor memory explosion
  • CVE-2026-47207: crash on multiple ext_proc responses in one gRPC message
  • CVE-2026-47221: null pointer deref in router internal redirects
  • CVE-2026-47204: grpc_stats segfault on Connect requests to direct_response
  • CVE-2026-48090: OAuth2 use-after-free on late async token completion
  • CVE-2026-48497: abnormal process termination in DNS UDP filter
  • CVE-2026-48706: heap buffer overflow in TcpStatsdSink on large stat names

Also fixed

Why 1.39.0 rather than the minimal 1.35.13 bump

v1.35.13 closes every published advisory affecting the 1.35 line, and was the initial target. But the PRIORITY/WINDOW_UPDATE flood fix shipped as a behavior change under the runtime guard envoy.reloadable_features.http2_flood_protection_active_streams, not as an advisory, so it carries no CVE or GHSA and appears in no advisory feed. It was not backported to 1.35.13, 1.36.9, 1.37.5 or 1.38.3.

Verified by inspecting source/common/http/http2/protocol_constraints.h at each tag:

Tag PRIORITY flood fix
v1.35.13 / v1.36.9 / v1.37.5 / v1.38.3 absent
v1.39.0 present, RUNTIME_GUARD = on by default

The gateway terminates HTTP/2 from untrusted clients, so this path is reachable. Moving to 1.39.0 also resets the 12-month backport window; the 1.35 line reached the end of it (v1.35.0 shipped 2025-07-23).

CVE-2026-47205 (>=1.36) and CVE-2026-47220 (>=1.37.0) never affected 1.35, but both are fixed in 1.39.0, so the line move adds no new exposure.

Behavior changes to validate against gateway config

  • HeaderMatcher now evaluates repeated headers individually rather than comma-joined (revertible via envoy.reloadable_features.match_headers_individually)
  • TLS inspector rejects client TLS versions outside 1.0-1.3
  • enforce_rsa_key_usage is deprecated and always enforced
  • OpenTelemetry tracing honors Envoy's sampling decision, which may reduce exported spans

Bazel 8 does not apply — this consumes the prebuilt image.

Verification

Base image only. The python3 install, scripts/{hot-restarter.py,start_envoy.sh} and ENTRYPOINT are unchanged.

  • Tag exists on Docker Hub with linux/amd64 + linux/arm64, matching the multi-arch build in release.yml
  • Image builds clean; binary reports 1.39.0; flood-protection guard compiled in; python3 and both scripts intact
  • SIGHUP hot restart exercised end to end: a new epoch started workers while the old process drained listeners — the zero-downtime path dashmate depends on

No test added: base-image version bump with no behavior delta in this repo, and there is no test suite here.

Follow-up

Not part of this PR: release tag v1.39.0-impr.1 publishes dashpay/envoy:1.39.0-impr.1, after which the dashmate pin can be bumped. The behavior changes above should be validated against the real gateway config before that pin lands.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated the Envoy runtime image to a newer version, providing the latest available improvements and fixes.

… bypass

v1.35.11 predates Envoy's 2026-06-23 security batch of 15 advisories.
v1.39.0 closes all of them plus an HTTP/2 flood-protection bypass that was
never backported to any patch line.

Denial of service / crash / memory exhaustion:
  - HTTP/2 PRIORITY and WINDOW_UPDATE flood bypass (no CVE assigned):
    limits scaled with the cumulative count of streams ever opened, so an
    attacker churning streams inflated the budget without bound and never
    tripped the limit. Now scales with active streams and retires on close.
  - GHSA-p7c7-7c47-pwch (high): HTTP/3 QPACK blocked-decoding DoS
  - CVE-2026-48042 (high): stack overflow in destructor of highly nested JSON
  - CVE-2026-48044 (high): zstd RLE zip bomb, decompressor memory explosion
  - CVE-2026-47207: crash on multiple ext_proc responses in one gRPC message
  - CVE-2026-47221: null pointer deref in router internal redirects
  - CVE-2026-47204: grpc_stats segfault on Connect requests to direct_response
  - CVE-2026-48090: OAuth2 use-after-free on late async token completion
  - CVE-2026-48497: abnormal process termination in DNS UDP filter
  - CVE-2026-48706: heap buffer overflow in TcpStatsdSink on large stat names

Also fixed:
  - CVE-2026-48743 (high): HTTP/3 to HTTP/1 request smuggling
  - CVE-2026-47778: embedded NUL TLS SAN truncation, auth bypass
  - CVE-2026-47775: OAuth2 padding oracle, plus opt-in AES-256-GCM cookies
  - CVE-2026-47692: PROXY protocol v2 skipped-TLV upstream spillover
  - CVE-2026-47261: wasmtime bump, upstream dependency

Why 1.39.0 rather than the minimal 1.35.13 bump: the PRIORITY/WINDOW_UPDATE
flood fix shipped as a behavior change under the runtime guard
envoy.reloadable_features.http2_flood_protection_active_streams, not as an
advisory, and was not backported to 1.35.13, 1.36.9, 1.37.5 or 1.38.3. It is
present and enabled by default only in 1.39.0, verified by inspecting
source/common/http/http2/protocol_constraints.h at each tag. The gateway
terminates HTTP/2 from untrusted clients, so this path is reachable.
Moving to 1.39.0 also resets the 12-month backport window; the 1.35 line
reached the end of it (v1.35.0 shipped 2025-07-23).

CVE-2026-47205 (>=1.36) and CVE-2026-47220 (>=1.37.0) never affected 1.35,
but both are fixed in 1.39.0, so the line move adds no new exposure.

Behavior changes in 1.39.0 to validate against gateway config: HeaderMatcher
now evaluates repeated headers individually rather than comma-joined, the TLS
inspector rejects client TLS versions outside 1.0-1.3, enforce_rsa_key_usage
is always enforced, and OpenTelemetry tracing honors Envoy's sampling
decision. The Bazel 8 change does not apply, as this consumes the prebuilt
image.

Base image only. The python3 install, hot-restarter scripts and ENTRYPOINT
are unchanged. No test added: base-image version bump, and the repo has no
test suite. Verified by building the image, confirming the binary reports
1.39.0 with the flood-protection guard compiled in, and exercising the
SIGHUP hot restart end to end: a new epoch started workers while the old
process drained listeners, which is the zero-downtime path dashmate uses.

Refs: https://github.com/envoyproxy/envoy/releases/tag/v1.39.0
Refs: envoyproxy/envoy#45077

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Dockerfile now uses Envoy base image v1.39.0 instead of v1.35.11.

Changes

Envoy image update

Layer / File(s) Summary
Update Envoy base image
Dockerfile
The FROM instruction updates envoyproxy/envoy from v1.35.11 to v1.39.0.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: bumping Envoy to v1.39.0 for security fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Dockerfile`:
- Line 1: Update the Dockerfile to run the hot-restarter.py → start_envoy.sh
entrypoint as a non-root Envoy user. Create or reuse a non-root user with access
to /etc/envoy, then switch to that user via USER or explicit su/gosu before the
ENTRYPOINT.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 85a4e8d0-464c-446e-b1fd-997610981540

📥 Commits

Reviewing files that changed from the base of the PR and between 38866d8 and 9964ef7.

📒 Files selected for processing (1)
  • Dockerfile

Comment thread Dockerfile
@ktechmidas
ktechmidas self-requested a review July 26, 2026 12:45

@ktechmidas ktechmidas left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shumkov
shumkov merged commit f31829f into dashpay:master Jul 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants