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-108740 Overview
CVE-2026-108740 is a mass assignment privilege escalation vulnerability in GoatCounter through version 2.7.0. The flaw resides in the userPrefSave handler, which processes form-encoded submissions to /user/pref without enforcing field-level authorization. Logged-in users with read-only access can submit crafted parameters such as user.access[all]=* and user.email_verified=true to assign themselves superuser or admin privileges. The handler fails to honor readonly struct tags during binding, allowing protected account fields to be overwritten. This weakness is classified under [CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes].
Critical Impact
Authenticated low-privilege users can escalate to full administrator or superuser roles within a GoatCounter instance by submitting a single crafted HTTP POST request.
Affected Products
- GoatCounter web analytics platform
- All releases through GoatCounter 2.7.0
- Self-hosted deployments exposing /user/pref to authenticated users
Discovery Timeline
- 2026-10-11 - CVE-2026-108740 published to the National Vulnerability Database
- 2026-10-16 - Last updated in NVD database
Technical Details for CVE-2026-108740
Vulnerability Analysis
GoatCounter is an open-source web analytics application written in Go. The userPrefSave handler in handlers/settings_user.go binds inbound form data directly to the User struct used for persisting account state. Go's form-decoding logic in this handler does not filter inbound field names against an allowlist, so any attribute reachable through the user.* prefix can be populated by the request body. Attackers abuse this binding gap to overwrite privileged fields that the user interface never exposes.
Root Cause
The root cause is improper enforcement of field-level authorization during object deserialization. Although sensitive attributes on the user object carry readonly struct tags, the handler's binding path ignores those tags and merges attacker-controlled values into the record before saving. The access-control model assumes users can only modify fields rendered by the preferences form, yet the server performs no server-side verification of which fields the submitter is permitted to change.
Attack Vector
An authenticated user with any role, including read-only accounts, sends a POST request to /user/pref containing user.access[all]=* to grant global superuser rights and user.email_verified=true to bypass verification gates. The server persists these values to the user record, and the next authenticated action is evaluated against the elevated role. No special tooling is required beyond a standard HTTP client and a valid session cookie.
For technical reproduction details, review the HackMD Analysis of GoatCounter Bug, the VulnCheck Advisory on GoatCounter Escalation, and the vulnerable binding logic in the GitHub User Settings Handler Code and the GitHub User Options Code.
Detection Methods for CVE-2026-108740
Indicators of Compromise
- HTTP POST requests to /user/pref containing parameters prefixed with user.access or user.email_verified.
- Unexpected transitions of user records to access[all]=* or administrator roles in the GoatCounter database.
- Account activity from previously read-only users performing administrative operations such as site deletion or user management.
Detection Strategies
- Inspect web server and reverse-proxy access logs for POST bodies to /user/pref referencing privileged field names.
- Diff user records against a trusted baseline to identify unauthorized changes to access or email_verified columns.
- Correlate privilege changes with the originating session and source IP to identify the compromised account.
Monitoring Recommendations
- Enable request-body logging on the reverse proxy fronting GoatCounter and alert on user.access or user.email_verified tokens.
- Monitor administrative action audit trails for role changes that were not initiated through legitimate workflows.
- Track authentication events for accounts that suddenly gain access to admin-only routes shortly after submitting preference updates.
How to Mitigate CVE-2026-108740
Immediate Actions Required
- Restrict network access to the GoatCounter /user/pref endpoint behind VPN or IP allowlisting until an upgrade is deployed.
- Audit all GoatCounter user accounts for unexpected access[all]=* values or verified email flags set outside normal workflows.
- Revoke sessions for any accounts observed submitting crafted user.access or user.email_verified parameters.
Patch Information
The advisory identifies the vulnerable code paths in handlers/settings_user.go and user.go at commit 7e91d8a9bdbb0dd48496e498c5680f8f3477a1b4. Operators should monitor the GitHub Repository for GoatCounter for a fixed release beyond version 2.7.0 and upgrade immediately once published. The VulnCheck Advisory on GoatCounter Escalation tracks remediation status.
Workarounds
- Deploy a reverse-proxy rule that drops any POST request to /user/pref whose body contains user.access or user.email_verified parameters.
- Temporarily disable self-service preference updates for untrusted accounts if the deployment supports it.
- Reduce the number of authenticated users on affected instances until an upgraded binary is available.
# Example NGINX rule blocking mass assignment payloads to /user/pref
location = /user/pref {
if ($request_method = POST) {
set $block 0;
if ($request_body ~* "user\.access") { set $block 1; }
if ($request_body ~* "user\.email_verified"){ set $block 1; }
if ($block = 1) { return 403; }
}
proxy_pass http://goatcounter_upstream;
}
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

