All vulnerabilities

Servers and applications

GHSA-6j8g-rp8v-55vr

Per-IP Rate Limit Bypass via Spoofable X-Forwarded-For and CF-Connecting-IP Headers

Severity
Medium 6.5
Published
14 Nov 2026
Last changed
14 Nov 2026
Added to UpHeron
14 Nov 2026
Fixed in
1.18.0
Weakness
CWE-348
Attack
Over the network · No login needed · No user action needed
Attacker can
Change some data · Slow it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
Sources
Project advisories (GitHub)

Description

extract_remote_ip() returns a client-supplied header value as the client IP. Every per-IP rate limiter uses this value as the bucket key. An unauthenticated attacker rotates the header on each request and gets a fresh bucket every time. The per-IP rate limit stops working.

api/libs/helper.py:402-408:

The default Docker deployment does not use Cloudflare. nginx does not strip CF-Connecting-IP. Any client can set this header.

When CF-Connecting-IP is absent, the function reads X-Forwarded-For[0]. docker/nginx/proxy.conf.template:4 uses $proxy_add_x_forwarded_for which appends the real IP. The attacker-supplied value stays at index 0.

api/extensions/ext_proxy_fix.py sets ProxyFix(app.wsgi_app, x_port=1). x_for is not set. Werkzeug does not sanitise the header.

api/libs/rate_limit.py:61:

api/services/account_service.py:959:

Rotating the header rotates the bucket key. The limit never triggers.

From langgenius/dify's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
DifyServers and applications · github:langgenius/dify
  • Every version before 1.18.0

About Dify

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

From its GitHub repository.
GitHub stars
161,177GitHub, 15 Nov 2026
Forks
25,501GitHub, 15 Nov 2026
Latest release
1.19.0GitHub, 15 Nov 2026
Released
4 Nov 2026GitHub
First published on GitHub
12 Apr 2023GitHub

References