KEVWire

Security intelligence, with context.

Response snapshot Oct 27, 2026, 16:31 UTC

Back to the wire
Permalink
VulnerabilityCVE-2026-34157

Wails: wildcardPatternToRegex allows Origin bypass via suffix match in BindingsAllowedOrigins

| | | |---|---| | **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.

At a glance

Exploited
Not known
Severity
7.6 High (CVSS 4.0)
Chance of exploitation
Not estimated
Sources
1 source

What to do

GitHub lists first patched versions: github.com/wailsapp/wails/v2: 2.13.0. Confirm the affected range and upgrade guidance in the exact advisory.

Read GitHub-reviewed advisory GHSA-47hv-j4px-h3c9 (opens a new tab)

What happened

# 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

Continue reading

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 = 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 TLD - `https://myapp.com.attacker.com` — attacker-controlled subdomain - `https://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 |

Affected package ranges reported by GitHub: github.com/wailsapp/wails/v2: >= 2.0.0, < 2.13.0

Scores and how they were measured

CVSS base severity

7.6

Version 4.0As of

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

Measurement source (opens a new tab)

How bad it is if exploited. Not a prediction of exploitation or proof you are exposed.

EPSS probability

Not available

A model's estimate of exploitation in the next 30 days, not certainty or your own risk.

Related technology

Sources

  1. Primary source

    GitHub-reviewed advisory GHSA-47hv-j4px-h3c9 (opens a new tab)

    The public advisory supplies the description, affected package/version ranges, and any listed CVSS metric. GitHub review is not local review.

    Published Checked

  2. Primary source

    GitHub public advisory API page (opens a new tab)

    The API page supplied GHSA-47hv-j4px-h3c9, its actual identifiers, source dates, and structured metrics.

    Published Date not suppliedChecked

  3. Primary source

    GitHub public advisory API page (opens a new tab)

    The API page supplied GHSA-47hv-j4px-h3c9, its actual identifiers, source dates, and structured metrics.

    Published Date not suppliedChecked

Cite this record

For factual claims, cite the primary sources above; cite KEVWire for its compilation, dates, and classifications.

APA

KEVWire. (2026, October 27). Wails: wildcardPatternToRegex allows Origin bypass via suffix match in BindingsAllowedOrigins (CVE-2026-34157). https://kevwire.com/record/CVE-2026-34157

MLA

"Wails: wildcardPatternToRegex allows Origin bypass via suffix match in BindingsAllowedOrigins (CVE-2026-34157)." KEVWire, 27 Oct. 2026, kevwire.com/record/CVE-2026-34157.

Chicago

KEVWire. "Wails: wildcardPatternToRegex allows Origin bypass via suffix match in BindingsAllowedOrigins (CVE-2026-34157)." Last modified October 27, 2026. https://kevwire.com/record/CVE-2026-34157.

Evidence summary (plain text)

Wails: wildcardPatternToRegex allows Origin bypass via suffix match in BindingsAllowedOrigins (Oct 27, 2026).
| | |
|---|---|
| **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) |

---
CVSS 7.6 (version 4.0; evidence as of Oct 27, 2026; https://github.com/advisories/GHSA-47hv-j4px-h3c9).
Sources:
GitHub-reviewed advisory GHSA-47hv-j4px-h3c9: https://github.com/advisories/GHSA-47hv-j4px-h3c9
GitHub public advisory API page: https://api.github.com/advisories?type=reviewed&per_page=100&sort=updated&direction=desc&after=Y3Vyc29yOnYyOpK0MjAyNi0xMC0yN1QxNTowMzozMFrOAAV2xg%3D%3D
GitHub public advisory API page: https://api.github.com/advisories?type=reviewed&per_page=100&sort=updated&direction=desc
Record ID: CVE-2026-34157.
Record origin: Ingested record.
AI evidence: Not assessed.
Known exploitation: Not assessed.
Zero-day status: Not assessed. KEV membership alone does not establish zero-day status.
About this data

This record was ingested from a data source. Retrieved: Oct 27, 2026, 16:25 UTC. Ingestion is not an independent editorial investigation.

A CISA KEV listing documents known exploitation, not necessarily a zero-day; absence from the catalog does not prove a vulnerability has never been exploited.

Technology tags indicate possible relevance, not verified exposure. Confirm the affected product, version, and configuration against your own inventory; KEVWire does not scan your systems.

A personal reading checklist on this device, not verified remediation.

Record JSON

Your account

Email alerts

Email alerts are not available yet. To follow your stack today, use its RSS feed, which honors your filters, or connect an AI agent through the API.

Suggest an improvement

Ideas, missing sources, corrections, and bugs are all welcome. No account needed. Suggestions are reviewed by a person before anything changes.

Record details

Record detail