All vulnerabilities

Servers and applications

GHSA-r932-r4wq-x4fp

Comments Pro: anonymous visitors can spoof their IP address and bypass the comment blocklist, one-vote-per-visitor check and rate limit

Severity
Medium
Published
2 Dec 2026
Last changed
2 Dec 2026
Added to UpHeron
3 Dec 2026
Fixed in
4.0.0
Weakness
Authentication bypass by spoofing (CWE-290)CWE-348
Sources
Project advisories (GitHub)

Description

Comments Pro takes the client IP address from the CF-Connecting-IP, X-Forwarded-For and X-Real-IP request headers before REMOTE_ADDR, on every site, whether or not a proxy sets them. Grav 2 core only trusts these headers when the site enables them under system.http_x_forwarded (off by default), so that clients cannot spoof their address. Comments Pro does not go through that check. Any visitor can send an address of their choice, and the plugin uses it for the IP blocklist, the comment rate limit and the check that allows one vote per visitor, and stores it as the comment's IP address. PoC verified with the help of Claude Mythos 5.2 (Anthropic).

CommentApiController::getClientIp() (classes/CommentApiController.php, lines 1025-1040 in 3.0.8) returns the first public address it finds in HTTP_CF_CONNECTING_IP, HTTP_X_FORWARDED_FOR, HTTP_X_REAL_IP and REMOTE_ADDR, in that order. For X-Forwarded-For it takes the first entry of the list. Its result is the key for:

From getgrav/grav's security advisory. Shortened; the full text is there.

Workarounds

Until you can upgrade, have the proxy or web server in front of Grav remove or overwrite CF-Connecting-IP, X-Forwarded-For and X-Real-IP on incoming requests.

Workarounds as given by getgrav/grav's security advisory.

Affected software

SoftwareAffected versions
GravServers and applications · github:getgrav/grav
  • Every version before 4.0.0

About Grav

free software content management system written in PHP

From Wikidata, CC0 1.0.
Monthly downloads (Packagist)
2,784Packagist, 29 Nov 2026
Total downloads (Packagist)
94,507Packagist, 29 Nov 2026
GitHub stars
15,745GitHub, 29 Nov 2026
Forks
1,431GitHub, 29 Nov 2026
Latest release
2.2.35GitHub, 29 Nov 2026
Released
25 Nov 2026GitHub
License
MIT LicenseWikidata
Written in
PHPWikidata
First published on GitHub
2 Aug 2014GitHub

References