CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-5847-RM3G-23MW
7.5

GHSA-5847-RM3G-23MW: Authentication Rate Limit Bypass via IPv6-Mapped Address

Alon Barad
Alon Barad
Software Engineer

Mar 3, 2026·5 min read·3 visits

PoC Available

Executive Summary (TL;DR)

Attackers can bypass authentication rate limits by switching between IPv4 (1.2.3.4) and IPv4-mapped IPv6 (::ffff:1.2.3.4) addresses, effectively doubling their allowed brute-force attempts per IP.

A security vulnerability exists in the OpenClaw AI agent framework's hook authentication mechanism. The flaw permits attackers to bypass configured rate limits by exploiting inconsistent string representations of client IP addresses. By alternating between standard IPv4 notation and IPv4-mapped IPv6 notation, a single attacker can manipulate the rate limiter into allocating multiple attempt buckets for the same source, significantly weakening protection against brute-force credential attacks.

Vulnerability Overview

The OpenClaw framework implements a rate-limiting mechanism to protect its hook authentication endpoints from brute-force attacks. This system tracks authentication failures associated with client IP addresses and blocks access after a defined threshold is reached. The integrity of this protection relies on the system's ability to uniquely and consistently identify a client based on their network address.

The vulnerability, identified as GHSA-5847-RM3G-23MW, resides in the failure to canonicalize IP address strings before using them as lookup keys in the rate limit storage. OpenClaw accepts connections via Node.js sockets, which may report the remote address in different formats depending on the network stack configuration and the ingress method.

Specifically, the system treats the standard IPv4 representation (e.g., 192.168.1.1) and the IPv4-mapped IPv6 representation (e.g., ::ffff:192.168.1.1) as two distinct entities. This logical error creates a split-horizon view of the attacker, where a single physical source controls multiple virtual identities within the rate limiter's state, undermining the security policy intended to throttle excessive authentication attempts.

Root Cause Analysis

The root cause is an Input Validation vulnerability classified under CWE-307 (Improper Restriction of Excessive Authentication Attempts) and implied CWE-287 (Improper Authentication). The issue stems from the direct usage of the req.socket.remoteAddress property in Node.js as a cache key without normalization.

In dual-stack network environments, operating systems may represent IPv4 addresses embedded within IPv6 structures. These are known as IPv4-mapped IPv6 addresses, typically formatted with the prefix ::ffff:. While 1.2.3.4 and ::ffff:1.2.3.4 refer to the exact same host, they are distinct strings. The OpenClaw rate limiter utilized a Javascript Map or similar key-value store where keys are strictly typed strings.

Prior to the patch, the application logic retrieved the client IP and performed only a basic whitespace trim. It did not attempt to parse the IP or collapse mapped addresses into their canonical IPv4 form. Consequently, the rate limiter instantiated separate counters for each string variant. This behavior violates the principle that security controls must operate on canonical data representations to prevent evasion via encoding or formatting manipulation.

Code Analysis

The vulnerability existed in src/gateway/auth-rate-limit.ts where the client IP was extracted. The original code simply used the raw string provided by the socket interface.

Vulnerable Implementation:

// src/gateway/auth-rate-limit.ts (Pre-patch)
function normalizeIp(ip: string | undefined): string {
  // Flaw: Only trims whitespace; does not resolve mapped IPs
  return (ip ?? "").trim() || "unknown";
}

The patch addresses this by introducing a robust normalization step. The fix involves importing a resolveClientIp utility from a centralized networking module. This utility parses the address and converts IPv4-mapped IPv6 addresses back to their standard IPv4 notation before the rate limiter processes them.

Patched Implementation:

// src/gateway/auth-rate-limit.ts (Fixed in commit 3284d2eb)
import { isLoopbackAddress, resolveClientIp } from "./net.js";
 
export function normalizeRateLimitClientIp(ip: string | undefined): string {
  // Fix: Canonicalizes the IP using centralized logic
  return resolveClientIp({ remoteAddr: ip }) ?? "unknown";
}
 
// The rate limiter now uses the normalized output as the key
function normalizeIp(ip: string | undefined): string {
  return normalizeRateLimitClientIp(ip);
}

By ensuring that ::ffff:1.2.3.4 resolves to 1.2.3.4, the application guarantees that both request formats increment the same failure counter, enforcing the rate limit correctly.

Exploitation Methodology

An attacker can exploit this vulnerability to extend the window for a brute-force attack against hook authentication tokens. The exploitation process involves toggling the network formatting of the source IP address.

First, the attacker initiates a series of authentication requests using standard IPv4 connectivity. They continue until the server responds with HTTP 429 (Too Many Requests), indicating the rate limit bucket for the IPv4 address is exhausted. In a standard configuration, this might happen after 20 attempts.

Next, the attacker modifies their network client to force the usage of IPv6 mapping, or routes traffic through a local proxy that presents the address as ::ffff:<IP>. The OpenClaw server receives the connection, sees the new string representation, and checks its internal store. Finding no existing record for this "new" client, it initializes a fresh bucket with a full quota of attempts.

This effectively doubles the number of guesses an attacker can make per IP address per lockout window. While this does not grant infinite attempts, it significantly degrades the efficacy of the rate limiting mechanism, especially when combined with a distributed botnet where every node can now perform 2x the work.

Impact Assessment

The primary impact of GHSA-5847-RM3G-23MW is the weakening of the application's defense against credential stuffing and brute-force attacks. By circumventing the intended request limits, attackers increase the probability of successfully guessing valid authentication tokens for OpenClaw hooks.

Security Scope:

  • Confidentiality: Compromised authentication tokens could allow attackers to read sensitive data exposed via hooks.
  • Integrity: Attackers with valid tokens could trigger unauthorized actions or inject malicious data into the AI agent workflow.
  • Availability: While primarily an authentication bypass, the ability to send twice the volume of requests before blocking could marginally increase the load on the system during a DoS attempt, though this is secondary to the authentication risk.

The severity is classified as Medium to High depending on the sensitivity of the actions protected by the hook authentication. If the hooks allow for remote code execution or modification of critical agent behavior, the risk is elevated.

Official Patches

OpenClawOfficial fix commit implementing IP normalization

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected Systems

OpenClaw

Affected Versions Detail

Product
Affected Versions
Fixed Version
OpenClaw
OpenClaw
< Feb 22 2026commit 3284d2eb
AttributeDetail
CWE IDCWE-307
Vulnerability TypeRate Limit Bypass
Attack VectorNetwork
SeverityMedium/High
PlatformNode.js
StatusPatched

MITRE ATT&CK Mapping

T1110Brute Force
Credential Access
T1078Valid Accounts
Defense Evasion
CWE-307
Improper Restriction of Excessive Authentication Attempts

Improper Restriction of Excessive Authentication Attempts

Known Exploits & Detection

GitHubRegression tests included in the fix commit demonstrate the bypass mechanism.

Vulnerability Timeline

Vulnerability reported by @aether-ai-agent
2026-02-22
Fix commit 3284d2eb pushed to main branch
2026-02-22
GHSA-5847-RM3G-23MW published
2026-02-22

References & Sources

  • [1]GitHub Advisory: GHSA-5847-RM3G-23MW
  • [2]OpenClaw Repository

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.