Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-34157-poc — Go proof-of-concept reproducing CVE-2026-34157, a Wails v2 origin validator wildcard bypass (CWE-625), comparing vulnerable v2.12.0 against fixed v2.13.0. | Kitploit
Tools/GitHubGitHub/saku0512/cve-2026-34157-poc
Vulnerability AnalysisExploitationWeb SecurityLearning & Education
GitHubsaku0512/cve-2026-34157-poc

CVE-2026-34157-poc

Go proof-of-concept reproducing CVE-2026-34157, a Wails v2 origin validator wildcard bypass (CWE-625), comparing vulnerable v2.12.0 against fixed v2.13.0.

View Repository
1 month agoNot yet reviewed
Share

CVE-2026-34157: Wails Origin Validator Wildcard Bypass PoC

日本語版はこちら

Description

This repository contains a safe local proof of concept for CVE-2026-34157, based on the Wails public advisory GHSA-47hv-j4px-h3c9.

Wails v2 uses BindingsAllowedOrigins to restrict which web origins may invoke Go backend bindings. Before the fix, every * in an allowed-origin pattern was converted to the regular expression .*. If a developer used https://myapp.com* intending to allow that domain and a port or related URL, the validator also allowed attacker origins such as https://myapp.community and https://myapp.com.attacker.com.

This PoC runs the real Wails OriginValidator from v2.12.0 and v2.13.0 in temporary copies and compares their authorization decisions for the same allowed pattern and attacker origins. It does not use the network, launch a GUI, access files, or invoke a Go binding.

Discovered by: Saku0512

Disclaimer

This project is intended only for education and explicitly authorized security testing. Do not use it against systems or environments without permission.

Vulnerability Details

  • CVE ID: CVE-2026-34157
  • GitHub Advisory: GHSA-47hv-j4px-h3c9
  • Product: github.com/wailsapp/wails/v2
  • Type: Permissive Regular Expression (CWE-625)
  • Severity: High
  • CVSS v4.0: 7.6 (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 versions: >= 2.0.0, < 2.13.0
  • Patched version: 2.13.0
  • Platforms: Windows / Linux / macOS
  • Preconditions:
    • The application configures BindingsAllowedOrigins.
    • It uses a partial-label or trailing wildcard such as https://myapp.com*.
    • The Wails WebView loads attacker-origin content or a user opens it.

The documented complete-component subdomain pattern https://*.myapp.com is not affected by this issue.

Root Cause

The vulnerable wildcardPatternToRegex escaped regex metacharacters and then unconditionally replaced every * with .*:

escaped = strings.ReplaceAll(escaped, "*", ".*")
return "^" + escaped + "$"

The configuration:

https://myapp.com*

therefore became:

^https://myapp\.com.*$

Because the expression does not respect origin-component boundaries, it allows all of these attacker origins:

https://myapp.community
https://myapp.com.attacker.com
https://myapp.comXXXXX

The patched implementation expands * to [^.:/@]+ only when it represents a complete component bounded by separators such as ://, ., or :. A partial label such as myapp.com* is treated literally and fails closed.

Proof of Concept

Requirements

  • Go 1.22 or later
  • Network access for the initial Wails module download

Compare vulnerable and patched versions

./scripts/run-version-matrix.sh

Expected key output:

Wails v2.12.0
[!] VULNERABLE: trailing wildcard allowed all crafted attacker origins.

Wails v2.13.0
[+] FIXED: trailing wildcard rejected all crafted attacker origins.

Test one version

Vulnerable version:

./scripts/run-poc.sh v2.12.0 vulnerable

Patched version:

./scripts/run-poc.sh v2.13.0 fixed

run-poc.sh:

  1. Downloads the selected Wails module into the Go module cache.
  2. Copies the read-only cached module into an OS temporary directory.
  3. Adds poc_test.go to the real internal/frontend/originvalidator package.
  4. Calls the public constructor and IsOriginAllowed through go test.
  5. Automatically removes the temporary copy.

It does not modify the module cache or an existing Wails source tree.

Test Cases

The PoC verifies that:

  • An exact allowed origin still passes as a baseline.
  • An unrelated origin is rejected as a negative control.
  • https://*.myapp.com permits only a legitimate one-label subdomain.
  • https://myapp.com* is tested against three attacker origins.
  • v2.12.0 reproduces the bypass and v2.13.0 rejects every bypass attempt.

Scope

This PoC directly exercises the real Origin Validator authorization boundary identified by the advisory. It does not load an external page in a WebView or invoke bindings in a complete Wails desktop application. Post-bypass impact depends on which bindings the affected application exposes.

Remediation

Upgrade to Wails v2.13.0 or later. If an immediate upgrade is not possible, do not use trailing or partial-label wildcards; enumerate allowed origins exactly. When using https://*.myapp.com, ensure that only trusted subdomains exist.

References

  • GHSA-47hv-j4px-h3c9
  • CVE-2026-34157
  • Wails PR #5074
  • Wails v2.13.0
Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    867
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    544
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    385
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    360
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    302
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    279

Explore all tools

Browse our collection of tools

View all tools →