HIGHCVSS not yet scoredVulnerability

CVE-2026-34157

# Security Vulnerability Report: Wails v2 — Origin Validator Bypass via Wildcard Pattern | | | |---|---| | **Product** | wailsapp/wails (v2) | | **Affected File** | `v2/internal/frontend/originvalidator/originValidator.go` | | **Affected Versions** | All versions containing originValidator (latest as of 2026-03-26) | | **CVSSv4.0** | **7.6 HIGH** — `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:L/SC:L/SI:L/SA:N` | | **CWE** | CWE-625: Permissive Regular Expression | | **Platforms** | Windows / Linux / macOS (all desktop targets) | --- ## Summary Wails v2 provides `BindingsAllowedOrigins` to restrict which web origins can invoke Go backend methods via IPC. The wildcard pattern matching in `wildcardPatternToRegex` converts `*` to `.*` without anchoring subcomponents, allowing suffix-matched origins to bypass the restriction. An attacker who controls a domain sharing a prefix with the allowed origin (e.g., `myapp.community` when `myapp.com*` is configured) can invoke arbitrary bound Go methods, potentially achieving file system access, data exfiltration, or code execution depending on the application's exposed API surface. --- ## Vulnerability Details ### Root Cause `wildcardPatternToRegex` converts a wildcard pattern to a regular expression by escaping special characters and replacing `*` with `.*`. The substituted `.*` has no restriction — it matches any character sequence including dots and additional domain components. ### Vulnerable Code **File:** `v2/internal/frontend/originvalidator/originValidator.go` ```go func (v *OriginValidator) wildcardPatternToRegex(wildcardPattern string) string { specialChars := []string{"\\", ".", "+", "?", "^", "$", "{", "}", "(", ")", "|", "[", "]"} escaped := wildcardPattern for _, specialChar := range specialChars { escaped = strings.ReplaceAll(escaped, specialChar, "\\"+specialChar) } // * becomes .* — matches ANY character sequence, including dots and domain separators escaped = stri

Properties

Ghsa id
GHSA-47hv-j4px-h3c9
Summary
Wails: wildcardPatternToRegex allows Origin bypass via suffix match in BindingsAllowedOrigins
Severity
high
Last source
GitHub Advisory Database
Cve id
CVE-2026-34157
First seen by Signal
2026-10-27T15:31:30+00:00
Is ghsa only
false
Retrieved at
2026-10-27T15:31:30+00:00
Ghsa published
2026-10-27T13:29:47Z
Source url
https://github.com/advisories/GHSA-47hv-j4px-h3c9
Ghsa updated
2026-10-27T13:29:48Z

Related Entities (3)

AFFECTS (1)

HAS_WEAKNESS (1)

VULNERABLE_TO (1)

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-34157 — Ninja Signal Threat Intelligence | Ninja Signal