Skip to content
Heist/ feed
Back to feed
HighFix available

Wails: wildcardPatternToRegex allows Origin bypass via suffix match in BindingsAllowedOrigins

Type: advisorySources: OSV

# 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/ori

Products
github.com/wailsapp/wails/v2
Affected versions
Not specified
Fixed versions
2.13.0
CVEs
CVE-2026-34157
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 18:03 UTC · Revision 1

Source evidence

Wails: wildcardPatternToRegex allows Origin bypass via suffix match in BindingsAllowedOrigins

core-osv · Original source

Published 27 Oct 2026, 13:29 UTC

# 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/ori

osv:GHSA-47hv-j4px-h3c9

github.com/wailsapp/wails/v2

Fixed versions: 2.13.0

Complete source record
{
  "id": "da0564e79a03e931e2d57449aa6b53502d0b0bc1063a5a5bdefc2b886a40000f",
  "url": "https://osv.dev/vulnerability/GHSA-47hv-j4px-h3c9",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Wails: wildcardPatternToRegex allows Origin bypass via suffix match in BindingsAllowedOrigins",
    "summary": "# 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/ori",
    "evidence": "osv:GHSA-47hv-j4px-h3c9",
    "products": [
      {
        "name": {
          "value": "github.com/wailsapp/wails/v2",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.13.0",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "GHSA-47hv-j4px-h3c9",
      "aliases": [
        "CVE-2026-34157",
        "GHSA-47hv-j4px-h3c9"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "2.0.0"
                },
                {
                  "fixed": "2.13.0"
                }
              ]
            }
          ],
          "package": {
            "name": "github.com/wailsapp/wails/v2",
            "purl": "pkg:golang/github.com/wailsapp/wails/v2",
            "ecosystem": "Go"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-47hv-j4px-h3c9/GHSA-47hv-j4px-h3c9.json"
          }
        }
      ],
      "modified": "2026-10-27T13:45:03.096294624Z",
      "provider": "osv",
      "references": [
        "https://github.com/wailsapp/wails/security/advisories/GHSA-47hv-j4px-h3c9",
        "https://github.com/wailsapp/wails/pull/5074",
        "https://github.com/wailsapp/wails/commit/bcc5941b72fdab6a13942b58871a2696faa85b81",
        "https://github.com/wailsapp/wails"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-625"
        ],
        "severity": "HIGH",
        "github_reviewed": true,
        "nvd_published_at": null,
        "github_reviewed_at": "2026-10-27T13:29:47Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-34157",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/database_specific/severity"
  },
  "source_id": "core-osv",
  "document_id": 461735,
  "published_at": "2026-10-27T13:29:47+00:00"
}