Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-105131 Overview
CVE-2026-105131 is a privilege escalation vulnerability in ezBookkeeping versions 1.2.0 through 2.0.0. The flaw resides in the TokenRefreshHandler function exposed at /api/v1/tokens/refresh.json. The handler never validates the token type before issuing a refreshed credential. An attacker holding a short-lived or IP-restricted API token can exchange it for a 30-day normal session token. The resulting session token bypasses API token expiry windows and configured IP allowlists. The issue is classified as [CWE-863: Incorrect Authorization] and is fixed in ezBookkeeping 2.0.1.
Critical Impact
Attackers with any valid API token can obtain full user session tokens, bypassing IP allowlists and token expiry restrictions enforced on the original API token.
Affected Products
- ezBookkeeping 1.2.0 through 2.0.0
- Self-hosted ezBookkeeping deployments exposing the /api/v1/tokens/refresh.json endpoint
- API integrations relying on IP-restricted or short-lived API tokens for scoped access
Discovery Timeline
- 2026-10-04 - CVE-2026-105131 published to the National Vulnerability Database
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-105131
Vulnerability Analysis
ezBookkeeping issues multiple token types, including normal user session tokens and scoped API tokens. API tokens can be configured with shorter lifetimes and IP allowlists to limit exposure for automation workflows. The TokenRefreshHandler in pkg/api/tokens.go accepts any valid bearer token and returns a refreshed credential. In vulnerable releases, the handler emits a normal user session token regardless of the submitted token's type. This downgrade of restrictions allows a caller holding only an API token to obtain a general-purpose session token valid for 30 days. The new token honors neither the original API token's IP allowlist nor its reduced expiry. An attacker can therefore extend access, pivot from a restricted automation account to full web-session equivalence, and evade monitoring built around API token rotation.
Root Cause
The root cause is missing token type verification in authorization logic. The vulnerable TokenRefreshHandler reads token claims and issues a replacement without checking claims.Type against core.USER_TOKEN_TYPE_NORMAL. Several sensitive handlers in the codebase shared the same oversight, treating any authenticated principal as equivalent regardless of token class. The patch introduces explicit type checks before privileged operations such as refresh, data clearing, and OAuth 2.0 callback processing.
Attack Vector
Exploitation requires a valid API token for an existing ezBookkeeping account. The attacker sends an HTTP request to /api/v1/tokens/refresh.json with the API token as the bearer credential. The server returns a normal session token in the response. The attacker then uses this session token against any API or web endpoint, including from an IP outside the original allowlist, until the 30-day lifetime expires.
// Patch excerpt - pkg/api/authorizations.go
// API tokens are now rejected before privileged operations
if claims.Type != core.USER_TOKEN_TYPE_NORMAL {
log.Warnf(c, "[authorizations.OAuth2CallbackAuthorizeHandler] token type \"%d\" is not allowed to login via oauth 2.0", claims.Type)
token = ""
claims = nil
} else if claims.Uid != user.Uid {
log.Warnf(c, "[authorizations.OAuth2CallbackAuthorizeHandler] oauth 2.0 user \"uid:%d\" does not match current user \"uid:%d\"", user.Uid, claims.Uid)
token = ""
claims = nil
}
// Patch excerpt - pkg/api/data_managements.go
claims := c.GetTokenClaims()
if claims == nil {
log.Warnf(c, "[data_managements.ClearAllDataHandler] current token is null")
return nil, errs.ErrInvalidToken
} else if claims.Type != core.USER_TOKEN_TYPE_NORMAL {
log.Warnf(c, "[data_managements.ClearAllDataHandler] token type \"%d\" is not allowed to clear all user data", claims.Type)
return nil, errs.ErrInvalidToken
}
Source: ezBookkeeping security patch commit 9a92b07
Detection Methods for CVE-2026-105131
Indicators of Compromise
- Successful POST requests to /api/v1/tokens/refresh.json originating from automation IP ranges associated with API token usage
- Session tokens observed in use from IP addresses outside the configured API token allowlist for the same user
- Account activity continuing after an API token's documented expiry window has elapsed
Detection Strategies
- Correlate token refresh events with the token type of the inbound credential and alert when non-normal tokens request refresh
- Baseline each user's typical API token source IPs and flag session tokens appearing from new geographies shortly after a refresh call
- Audit application logs for TokenRefreshHandler invocations preceding sensitive actions such as data export or settings changes
Monitoring Recommendations
- Enable verbose logging on the ezBookkeeping authentication subsystem and forward logs to a central SIEM for retention and analysis
- Monitor the ratio of refresh calls to normal login events; a sudden increase can indicate automated token exchange abuse
- Track long-lived session tokens issued immediately after an API token authentication and investigate anomalous pairs
How to Mitigate CVE-2026-105131
Immediate Actions Required
- Upgrade ezBookkeeping to version 2.0.1 or later, which enforces token type checks in TokenRefreshHandler and related handlers
- Revoke all existing API tokens and reissue them after the upgrade to invalidate any session tokens previously obtained through the flaw
- Review authentication logs for prior calls to /api/v1/tokens/refresh.json from API token holders and investigate downstream activity
Patch Information
The fix is included in the ezBookkeeping v2.0.1 release. Commit 9a92b07 adds claims.Type != core.USER_TOKEN_TYPE_NORMAL checks to the refresh handler, OAuth 2.0 callback, data clearing, and other privileged handlers. See the GitHub Security Advisory GHSA-wq25-mpcf-2mfc and the VulnCheck advisory for complete details.
Workarounds
- Block access to /api/v1/tokens/refresh.json at a reverse proxy or web application firewall until the upgrade is deployed
- Restrict ezBookkeeping to trusted networks using firewall rules so that leaked API tokens cannot reach the refresh endpoint from arbitrary hosts
- Rotate API tokens frequently and keep allowlists tight on upstream network controls, reducing the value of any token an attacker could exchange
# Example nginx rule to block the vulnerable endpoint pre-upgrade
location = /api/v1/tokens/refresh.json {
return 403;
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

