CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-M687-P538-R5HP

GHSA-m687-p538-r5hp: Permissive Localhost CORS Policy Leads to Account Takeover in Vikunja

Alon Barad
Alon Barad
Software Engineer

Oct 10, 2026·5 min read·12 visits

Executive Summary (TL;DR)

A CORS misconfiguration in Vikunja appends configured public URLs to default localhost wildcard origins instead of replacing them. Paired with credentialed CORS and an unauthenticated token refresh endpoint, a script running on any local port can fetch a valid bearer JWT for an authenticated user.

Vikunja versions 2.2.0 through 2.6.0 contain a Cross-Origin Resource Sharing (CORS) misconfiguration flaw in `code.vikunja.io/api`. Default configurations permit wildcard origins for localhost (`http://127.0.0.1:*` and `http://localhost:*`) with credentialed requests (`Access-Control-Allow-Credentials: true`). Because configuring a public service URL appends to this default list rather than overriding it, production environments inadvertently trust all local origins. A local page or application on a user's machine can execute a credentialed cross-origin request to the token refresh endpoint, extract the returned JWT access token, and achieve complete account takeover.

Vulnerability Overview

Vikunja is an open-source, self-hosted task management platform. In affected versions (>= 2.2.0, <= 2.6.0), the API server (code.vikunja.io/api) implements a Cross-Origin Resource Sharing (CORS) policy that defaults to trusting all ports on 127.0.0.1 and localhost with credentialed HTTP requests permitted.

The critical design flaw lies in how Vikunja handles configuration parsing for cors.origins. Setting the mandatory service.publicurl parameter in production environments appends the configured domain to the default wildcard array rather than replacing it. Consequently, production deployments unintentionally continue allowing cross-origin requests from any service running locally on the user's host machine.

When a victim visits a local application or a compromised web page bound to a local port, a script on that page can issue a cross-origin HTTP request to the target Vikunja instance. Because credentialed CORS is enabled, the browser attaches the victim's session cookies (vikunja_refresh_token), allowing the attacker to retrieve a new bearer JWT access token and take control of the user account.

Root Cause Analysis

The vulnerability stems from three interacting design choices across configuration parsing, middleware origin validation, and authentication architecture.

First, pkg/config/config.go sets default origins to http://127.0.0.1:* and http://localhost:*. When service.publicurl is defined during initialization, the application appends this value to cors.origins. There is no configuration option or internal logic to purge the default wildcard entries upon setting a explicit public domain.

Second, pkg/routes/routes.go configures the CORS middleware with AllowCredentials: true and utilizes a custom matching function (matchCORSOrigin) via Echo's UnsafeAllowOriginFunc. This function parses and validates dynamic ports against the wildcard entries, allowing any port on localhost or 127.0.0.1 to pass cross-origin access checks with ambient credentials.

Third, the token refresh endpoint (POST /api/v1/user/token/refresh) accepts the vikunja_refresh_token HTTP cookie—marked with SameSite=None when operating over HTTPS—and outputs a new access token directly in the JSON response body. Because the CORS policy grants Access-Control-Allow-Origin and Access-Control-Allow-Credentials: true to the requesting local origin, client-side JavaScript execution environment can read the token payload directly.

Code Analysis

Analysis of the underlying source code in go-vikunja/vikunja highlights the exact failure sequence across initialization and routing.

In pkg/config/config.go, the default origins are set as array elements before configuration processing:

// pkg/config/config.go
// Default configuration sets wildcard localhost origins
viper.SetDefault("cors.origins", []string{
    "http://127.0.0.1:*",
    "http://localhost:*",
})

Later in initialization, when service.publicurl is evaluated, the code appends the user's configured domain directly to the existing slice:

// pkg/config/config.go
// Appending public URL instead of replacing default origins
publicUrl := viper.GetString("service.publicurl")
if publicUrl != "" {
    origins := viper.GetStringSlice("cors.origins")
    origins = append(origins, publicUrl)
    viper.Set("cors.origins", origins)
}

In pkg/routes/routes.go, the CORS middleware registers AllowCredentials: true alongside the dynamic port matcher matchCORSOrigin:

// pkg/routes/routes.go
e.Use(middleware.CORSWithConfig(middleware.CORSConfig{
    AllowCredentials: true,
    UnsafeAllowOriginFunc: func(origin string) (bool, error) {
        return matchCORSOrigin(origin, config.CorsOrigins.GetStringSlice()), nil
    },
}))

When a request hits POST /api/v1/user/token/refresh, pkg/routes/api/v1/login.go retrieves the refresh token from the cookie, computes a fresh bearer JWT, and returns it in the response body. Since the response headers explicitly allow the calling local origin with credentials, the calling script gains unhindered access to the bearer token string.

Exploitation Mechanics

An attack scenario requires a logged-in Vikunja user to interact with a web service or page served from localhost or 127.0.0.1 on any port (for example, a local developer server, a malicious local daemon, or a local service vulnerable to Cross-Site Scripting).

The attack flow operates through standard browser mechanisms without requiring special privilege escalation:

To execute the exploit, JavaScript executing within the local origin issues an asynchronous fetch request to the remote Vikunja instance:

fetch('https://vikunja.example.com/api/v1/user/token/refresh', {
  method: 'POST',
  credentials: 'include'
})
.then(response => response.json())
.then(data => {
  const bearerToken = data.token;
  console.log('Exfiltrated Bearer Token:', bearerToken);
});

Because the browser sends the vikunja_refresh_token cookie and receives Access-Control-Allow-Credentials: true alongside the matching local origin in the response, the browser allows the JavaScript environment to access data.token. The attacker now possesses a valid API JWT for the victim's account.

Impact & Risk Assessment

This vulnerability achieves full confidentiality and integrity impact on the affected user account (VC:H/VI:H under CVSS v4.0). Once an access token is extracted, the attacker can impersonate the victim across all Vikunja API endpoints, accessing private tasks, projects, user settings, and connected integrations.

The overall severity is rated High (CVSS 7.2). The attack vector requires a local prerequisite or user interaction involving a local origin, satisfying AV:L / UI:P. However, because no authentication is needed to trigger the refresh endpoint itself beyond the presence of the cookie, PR:N applies.

This flaw particularly threatens developers, administrators, and users who run local web servers or tools while remaining logged into a remote production Vikunja deployment.

Remediation & Patch Guidance

To resolve this issue, operators must upgrade to a fixed post-2.6.0 release of code.vikunja.io/api where configuration loading has been updated to treat user-specified origins as strict replacements for default values.

If immediate patching is not possible, proxy-level mitigations can be implemented using a reverse proxy (such as NGINX, HAProxy, Caddy, or Traefik) placed in front of the Vikunja API instance.

The reverse proxy should inspect incoming Origin headers and strip or override CORS response headers when the origin matches localhost or 127.0.0.1 pattern in production environments:

# Example NGINX mitigation: sanitize Origin headers
if ($http_origin ~* "^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$") {
    return 403;
}

Additionally, operators should audit their deployment configuration files to verify that CORS origins do not explicitly include local wildcard entries unless strictly operating in a dedicated local development environment.

Official Patches

VikunjaOfficial Advisory and Resolution Guidance

Technical Appendix

CVSS Score
7.2/ 10
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Affected Systems

Vikunja API (code.vikunja.io/api) versions >= 2.2.0, <= 2.6.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
code.vikunja.io/api
Vikunja
>= 2.2.0, <= 2.6.0post-2.6.0
AttributeDetail
CWE IDCWE-942
CVSS Score7.2 (High)
CVSS VectorCVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Vulnerability TypePermissive Cross-Domain Security Policy
Affected Packagecode.vikunja.io/api
Exploit StatusProof of Concept Available
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1539Steal Web Session Cookie
Credential Access
T1189Drive-by Compromise
Initial Access
CWE-942
Permissive Cross-domain Security Policy with Untrusted Domains

The program uses a cross-domain security policy that authorizes unsafe or untrusted domains, allowing unexpected cross-origin interactions.

Known Exploits & Detection

GitHub Security AdvisoryProof of Concept code demonstrating fetch execution from localhost to retrieve bearer access tokens via token refresh endpoint.

Vulnerability Timeline

GitHub Security Advisory published for GHSA-m687-p538-r5hp
2026-10-09

References & Sources

  • [1]GitHub Security Advisory GHSA-m687-p538-r5hp
  • [2]GitHub Advisory Database Entry
  • [3]Default CORS Configuration Code Reference
  • [4]CORS Middleware Route Handlers Reference
  • [5]Public URL Appending Logic Code Reference
  • [6]Token Refresh Endpoint Handler Code Reference
  • [7]Refresh Cookie Handling Code Reference

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 4 hours ago•CVE-2026-63402
5.9

CVE-2026-63402: Prototype-Chain Traversal and Shared Built-in Corruption in i18next

CVE-2026-63402 is a prototype-chain traversal and shared built-in object corruption vulnerability in the i18next internationalization framework for JavaScript prior to version 26.3.4. The flaw resides in the deepExtend utility function within src/utils.js, which uses the JavaScript 'in' operator to verify property existence on target objects. When an application passes untrusted resource bundles to i18next.addResourceBundle() with both the deep and overwrite parameters set to true, an attacker can traverse into inherited methods on Object.prototype and overwrite properties on shared built-in function objects, causing process-wide denial of service.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 5 hours ago•CVE-2026-58262
7.1

CVE-2026-58262: BLS Signature Quorum Bypass via PubKeysBitmap Padding Bits in Klever-Go

CVE-2026-58262 (tracked internally as KLR-04 and via GitHub Security Advisory GHSA-f9h7-4mmq-vgcq) is a cryptographic verification and consensus quorum bypass vulnerability in Klever-Go (`klever-io/klever-go`), the Go implementation of the Klever blockchain protocol. Prior to version 1.7.20, the block header signature verification logic (`HeaderSigVerifier.verifyConsensusSize`) counts all set bits across the entire `PubKeysBitmap` byte slice toward the required two-thirds validator quorum without masking or validating unused trailing padding bits in the final byte. Because the underlying Boneh-Lynn-Shacham (BLS) multi-signature verification function (`blsMultiSigner.Verify`) iterates strictly over the indices of configured validator public keys, it ignores any bits set at indices beyond the active consensus group size. When the consensus group size is not an exact multiple of 8, a compromised or malicious block producer can set these unused trailing padding bits to artificially inflate the apparent signer count by up to 7 signatures, enabling blocks with fewer genuine validator signatures than required by the protocol to pass consensus validation.

Alon Barad
Alon Barad
3 views•14 min read
•about 6 hours ago•CVE-2026-77423
7.5

CVE-2026-77423: Regular Expression Denial of Service (ReDoS) in JLine Built-in Less Viewer

CVE-2026-77423 is a Regular Expression Denial of Service (ReDoS) vulnerability in the built-in less viewer of the JLine Java library (versions 3.0.0 prior to 3.30.15, and 4.0.0 prior to 4.3.1). The org.jline.builtins.Less class passes user-supplied search and display-filter patterns directly to Java's standard backtracking regular expression engine without complexity validation or execution timeouts. An attacker with access to an interactive JLine session can submit patterns containing nested quantifiers, causing catastrophic backtracking that consumes 100% of a CPU core and blocks the session thread indefinitely. In network-facing deployments such as SSH or Telnet administration consoles, repeated exploitation across concurrent sessions can exhaust bounded worker thread pools and result in a complete denial of service.

Alon Barad
Alon Barad
3 views•10 min read
•about 7 hours ago•CVE-2026-63492
8.1

CVE-2026-63492 (Duplicate of CVE-2026-63304): OS Command Injection in WWBN AVideo Standalone API

CVE-2026-63492 is a rejected CVE identifier originally assigned by GitHub for an OS command injection vulnerability in WWBN AVideo (formerly YouPHPTube) up to version 29.0. It was rejected as a duplicate of the canonical identifier CVE-2026-63304 (tracked under GHSA-j44m-77cc-p3cc). The flaw resides in the listFFmpegProcesses() function within plugin/API/standAlone/functions.php, which interpolates unsanitized user parameters directly into a single-quoted shell pipeline executed via PHP's exec() function. Attackers capable of crafting a valid AES-256-CBC encrypted API payload can break out of the single-quoted context and execute arbitrary operating system commands as the web-server user.

Amit Schendel
Amit Schendel
4 views•9 min read
•about 8 hours ago•CVE-2026-63476
4.3

CVE-2026-63476: Unbounded Memory Allocation and Denial of Service in isomorphic-git Packfile Delta Parser

CVE-2026-63476 is an uncontrolled resource consumption vulnerability in isomorphic-git prior to version 1.38.6. When parsing Git packfile delta objects during clone or fetch operations, the applyDelta utility reads an untrusted targetSize integer from the delta stream header and passes it directly to Buffer.alloc(). A malicious remote Git server or man-in-the-middle attacker can supply a delta header specifying a targetSize of approximately 2 GB with minimal actual payload data. Because Buffer.alloc() reserves off-heap memory in Node.js, this bypasses standard V8 heap limits and results in immediate out-of-memory termination or sustained memory retention.

Amit Schendel
Amit Schendel
5 views•10 min read
•about 9 hours ago•CVE-2026-63410
5.9

CVE-2026-63410: Compiler-Induced Timing Side-Channel in secp256k1-native Scalar Multiplication

CVE-2026-63410 (GHSA-vp2j-gqfm-r3cf) is a compiler-induced timing side-channel vulnerability in the secp256k1-native Ruby C extension. When compiled with GCC 14.x or 15.x at optimization level -O2, the compiler reconstructs boolean predicates from branchless bitwise multiplexer routines and emits secret-dependent conditional jump instructions (je/jne). During elliptic curve scalar multiplication in the Montgomery ladder, these conditional branches create observable execution timing variations correlated with individual bits of secret private keys or signing nonces.

Alon Barad
Alon Barad
3 views•12 min read