All vulnerabilities

Go

CVE-2026-86041

ezBookkeeping: Source-IP allowlist (MCP & API token) is bypassable via a spoofed `X-Forwarded-For` header

Severity
Medium
Published
9 Nov 2026
Last changed
9 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
1.6.0
Exploit chance
0.3% in the next 30 daysHigher than 24% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
CWE-348
Also known as
GHSA-wchh-mrv2-5h4q
Sources
OSV.dev and GitHub

Description

A remote attacker from any IP address defeats the operator-configured source-IP allowlist (mcp_allowed_remote_ips / api_token_allowed_remote_ips) by sending a single X-Forwarded-For: header. The router is created with gin.New() and never calls SetTrustedProxies, so gin trusts every proxy by default and c.ClientIP() returns the attacker-supplied header verbatim. The same forged value is also written to Transaction.CreatedIp and the access log, so the attacker's real IP never appears in any record.

cmd/webserver.go:104 builds the router with gin.New(). A grep of cmd/ and pkg/ confirms SetTrustedProxies is never called, leaving gin's default trusted-proxy range of 0.0.0.0/0 and ::/0. WebContext (pkg/core/context_web.go:39) embeds *gin.Context and does not override ClientIP().

Both allowlist middlewares match the operator allowlist against this attacker-controlled value:

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
github.com/mayswind/ezbookkeepingGo · osv:Go:github.com/mayswind/ezbookkeeping
  • From 0.10.0 before 1.6.0

About github.com/mayswind/ezbookkeeping

This is the only vulnerability in github.com/mayswind/ezbookkeeping in our list.

References