Wails v2 CVE-2026-34157
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessRegister prefix-matching domain (myapp.community)
-
DeliveryLure app webview to attacker origin
-
ExploitSuffix-match bypasses origin validator
-
ExecutionInvoke bound Go methods via IPC
-
ImpactRead/write files or exfiltrate data
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Permissive regular expression
|
| Exploitation Conditions | Exploitable ONLY when the developer has configured Wails BindingsAllowedOrigins with a trailing/partial-label wildcard (e.g. 'https://myapp.com*'), which the advisory describes as a natural misuse; the officially documented subdomain-prefix pattern 'https://*.myapp.com' is NOT affected, and default configurations without such a wildcard are not vulnerable. The attacker must additionally control a domain that shares the literal prefix of the configured pattern (e.g. myapp.community, myapp.com.attacker.com, or any myapp.comXXXXX suffix), and that attacker origin must be loaded by the Wails application's webview, i.e. user/webview interaction is required (UI:P). Limiting factors: non-default misconfiguration required, required interaction to load the malicious origin, and the realized impact is bounded by which Go methods the specific application exposes via bindings. |
| Impact | The vendor-supplied CVSS 4.0 vector (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, 7.6 HIGH) is the only quantitative signal; NVD provides no base score (CVSS: N/A), and there is no EPSS value, no CISA KEV listing, and no public exploit code - only vendor advisory and fix references. These signals converge on a conditional rather than broadly urgent risk: the network vector (AV:N) and unauthenticated attacker (PR:N) look severe, but AT:P and UI:P encode two real brakes - the flaw manifests ONLY when a developer misconfigures BindingsAllowedOrigins with a trailing wildcard like 'myapp.com*' (the documented/default 'https://*.myapp.com' subdomain pattern is explicitly NOT vulnerable), and a victim-side user/webview interaction is needed to load the attacker origin. So this is a genuine HIGH-severity authorization bypass but not a widespread drive-by: absence from KEV and no EPSS/exploit signal, combined with the non-default-config precondition, point to targeted, opportunistic exploitation of misconfigured apps rather than mass exploitation. The vuln.today Decision label is 'this_week' (not act_now/emergency), consistent with prioritized-but-not-fire-drill patching; a fix is available in version 2.13.0, so the correct action is to upgrade this week and audit BindingsAllowedOrigins for trailing-wildcard misuse. Note the impact ceiling (file access, data exfiltration, possible command execution) is itself conditional on what Go methods each application binds - the CVE describes the bypass mechanism, not a guaranteed RCE. |
| Exploit ScenarioDerived | A developer configures Wails BindingsAllowedOrigins with a trailing wildcard such as 'https://myapp.com*', which compiles to the permissive regex ^https://myapp\.com.*$; an attacker registers a prefix-matching domain (e.g. myapp.community or myapp.com.attacker.com) and gets the app's webview to load that attacker origin. Because the regex suffix-matches, the attacker's page passes origin validation and can invoke any bound Go backend method over IPC, reading or writing files or exfiltrating data depending on the application's exposed bindings. No public exploit code was identified at time of analysis, and exploitation depends on both the non-default trailing-wildcard misconfiguration and user/webview interaction (UI:P). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 28, 2026
Wails v2's BindingsAllowedOrigins wildcard matching can be bypassed when an application is configured with a trailing or partial-label wildcard such as https://myapp.com*, allowing an attacker-controlled origin sharing that literal prefix, for example myapp.community or myapp.com.attacker.com, to invoke bound Go methods once that origin is loaded in the webview. The documented subdomain-prefix pattern https://*.myapp.com and default configurations without such a wildcard are not affected, and realized impact depends on which Go methods the application exposes. The vendor rates this 7.6 HIGH under CVSS 4.0; no public exploit identified at time of analysis and no CISA KEV listing, and exploitation requires the non-default misconfiguration plus user/webview interaction to load the attacker origin.
RemediationAI
Vendor-released patch: 2.13.0. Upgrade to Wails v2.13.0, which contains the fix from PR #5074 (commit bcc5941b72fdab6a13942b58871a2696faa85b81); see the GitHub advisory GHSA-47hv-j4px-h3c9. Review BindingsAllowedOrigins configurations and replace trailing or partial-label wildcards such as https://myapp.com* with explicit exact origins or the documented subdomain-prefix form https://*.myapp.com where appropriate. Trade-off: exact entries require enumerating every origin, while the subdomain-prefix wildcard only matches a complete subdomain component; after the patch, partial-label wildcards are treated literally and fail closed, so applications relying on them may need configuration changes. No other mitigation is stated by the vendor.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in go
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Wails is a Go framework for building desktop applications with a web frontend; its origin validator decides whether a web origin may call Go methods exposed through bindings. The flaw is CWE-625, a permissive regular expression: wildcardPatternToRegex escaped special characters but replaced every '*' with '.*', so a pattern such as https://myapp.com* produced ^https://myapp\.com.*$, which matches different TLDs, attacker subdomains, and arbitrary suffixes. The fix in PR #5074 changes the conversion so '*' is a wildcard only when it spans a complete origin component, bounded on the left by ://, . or : and on the right by ., :, / or end of pattern; such wildcards expand to [^.:/@]+, and the regex is anchored with \A and \z. Partial-label or trailing wildcards are left literal and therefore fail closed. The documented subdomain pattern https://*.myapp.com remains supported and is not affected; exploitation is limited to applications that configured a trailing or partial wildcard and whose webview loads the attacker-controlled origin.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N web origin and PR:N (no attacker privileges); AC:H and UI:R reflect the required non-default trailing-wildcard config plus webview interaction; S:C as the web-origin bypass reaches OS/backend resources.
Estimated by vuln.today — no official severity rating has been published for this CVE yet.
DescriptionCVE.org
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
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 = strings.ReplaceAll(escaped, "*", ".*")
return "^" + escaped + "$"
}The generated regex for https://myapp.com* is:
^https://myapp\.com.*$This matches any string beginning with https://myapp.com, including:
https://myapp.community- different TLDhttps://myapp.com.attacker.com- attacker-controlled subdomainhttps://myapp.comXXXXX- any arbitrary suffix
Scope Note
The official comment in options.go gives https://*.myapp.com as the example pattern (subdomain prefix wildcard). This pattern is not affected. The vulnerability only manifests when developers use a trailing wildcard (myapp.com*), which is a natural misuse when intending to permit a domain and all its subpaths or ports.
---
Impact
Any Go method registered with Wails bindings becomes callable from the attacker's origin. Depending on the application:
- File system read / write (common in desktop apps)
- Database queries
- OS command execution (if exposed via bindings)
- Sensitive configuration or credential access
---
Fix
PR: https://github.com/wailsapp/wails/pull/5074
Wildcards are now only expanded when they represent a full domain component (immediately after ://, ., or :). A wildcard appended to a partial label (e.g. com*) is stripped, preventing suffix-based bypasses. Comprehensive test suite added.
---
Disclosure Timeline
| Date | Event |
|---|---|
| 2026-03-26 | Vulnerability discovered during source code audit by @Saku0512 |
| 2026-03-26 | Private report submitted via GitHub Security Advisory |
| 2026-03-26 | Vendor acknowledgement and fix PR opened (#5074) |
| TBD | Patch release |
| TBD + 90 days | Public disclosure deadline |
Technical POC Analysis
CWE-625 (Permissive Regular Expression).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
CVE-2026-34157 affects Wails v2, a framework used to build desktop applications with Go backends and webview frontends. Only applications that were configured with a non-default trailing or partial-label origin wildcard (such as https://myapp.com*) are exposed; in those cases an attacker-controlled lookalike domain could invoke the application's bound Go methods. Leadership should care because any such desktop apps we ship or operate could permit unintended actions through exposed backend methods, though the default Wails configuration is unaffected and no public exploit has been identified.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
GHSA-47hv-j4px-h3c9
CVE.org
Exploit-DB