Api: Vikunja: Permissive Cross-domain Security Policy trusts every localhost origin which should not be trusted
Description
Vikunja's API has a permissive Cross-Origin Resource Sharing (CORS) policy that trusts all localhost origins by default, combined with sending Access-Control-Allow-Credentials: true. This allows any page served from localhost on any port to make credentialed cross-origin requests and read responses, including the token refresh endpoint that returns a bearer token in the response body. This token grants full API access for the logged-in user. The default configuration appends localhost origins to the allowed list rather than replacing them, causing production deployments to inadvertently trust all localhost origins. An attacker controlling a page on localhost can exploit this to obtain a valid access token without user interaction.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Vikunja's default CORS configuration enables cors.origins to include 'http://127.0.0.1:*' and 'http://localhost:*' with Access-Control-Allow-Credentials set to true. The service.publicurl setting, mandatory for deployment, is appended to this list rather than replacing it, resulting in production deployments trusting localhost origins alongside the intended public URL. The refresh token endpoint authenticates using an HttpOnly, SameSite=None refresh cookie and returns a new bearer JWT token in the JSON response body. Because the browser automatically sends the refresh cookie with credentialed fetch requests, a malicious page served from any localhost port can perform a fetch to the refresh endpoint, receive the bearer token, and read it due to permissive CORS headers. This token provides full API access as the logged-in user. The vulnerability was demonstrated with a proof-of-concept that successfully obtained a valid token from a localhost page.
Potential Impact
An attacker able to run a page on any localhost port on the victim's machine can obtain a valid bearer token for the victim's Vikunja account without needing to steal cookies or credentials directly. This token grants full API access, allowing the attacker to perform any actions the victim can. The vulnerability arises from the combination of permissive localhost CORS origins with credentialed requests and the refresh token endpoint returning tokens in the response body. This effectively allows privilege escalation from a local attacker or malicious local web content.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Operators should review and explicitly configure the cors.origins setting to exclude localhost origins in production environments. Avoid relying on default CORS settings that include wildcard localhost origins. Monitor vendor advisories for an official fix or updated guidance to disable or restrict localhost origins in the CORS configuration. Until a patch is available, do not deploy Vikunja with default CORS settings in production.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-m687-p538-r5hp
- Osv Schema Version
- 1.4.0
- Ecosystems
- ["Go"]
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
Threat ID: 6ac96e3c2cdf04f65689a53b
Added to database: 10/09/2026, 22:44:12 UTC
Last enriched: 10/09/2026, 22:45:16 UTC
Last updated: 10/09/2026, 22:45:16 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.