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
Tools/GitHubGitHub/googlesky/cve-2026-107853
Web Vulnerability ScannersVulnerability AnalysisExploitationCryptographyPapers & ResearchLabs & Practice
GitHubgooglesky/cve-2026-107853

CVE-2026-107853

Proof-of-concept and lab for CVE-2026-107853: tiny-secp256k1's 3-arg xOnlyPointAddTweakCheck accepts invalid tweak derivations via a stale wasm buffer.

View Repository
1 day agoNot yet reviewed

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.

    891
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    810
  • 3

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    638
  • 4

    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.

    453
  • 5

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    436
  • 6

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    386

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-107853 — tiny-secp256k1: stale-buffer xOnlyPointAddTweakCheck accepts invalid tweak derivations

License: MIT Research status: validated

CVECVE-2026-107853
Componenttiny-secp256k1 — xOnlyPointAddTweakCheck 3-argument path (src/index.ts over the wasm backend)
Affected>= 2.1.0, < 2.2.5
Fixed in2.2.5 — commit ba1af1fc (GHSA-hj9c-qx2w-g7mh)
CWECWE-457 (Use of Uninitialized Variable), CWE-754 (Improper Check for Unusual/Exceptional Conditions)
ImpactThe three-argument xOnlyPointAddTweakCheck path ignores the wasm failure return and compares an unchanged input buffer. When the tweak result is the point at infinity, this stale-buffer comparison can return true for an invalid derivation — an attacker can craft a tweak whose "checked" result equals the input itself and have it accepted by any consumer that trusts this check
VectorLibrary callers (wallets/protocols) verifying tweaked output keys against attacker-influenced (point, tweak, claimed-result) triples
TriggerxOnlyPointAddTweakCheck(G, n−1, G) — the derivation lands on the point at infinity and fails

The vulnerable path discarded the wasm failure return:

// index.ts — pre-fix (2.2.4)
X_ONLY_PUBLIC_KEY_INPUT.set(point);
X_ONLY_PUBLIC_KEY_INPUT2.set(resultToCheck);
TWEAK_INPUT.set(tweak);
if (hasParity) {
  return wasm.xOnlyPointAddTweakCheck(tweakParity) === 1;
} else {
  wasm.xOnlyPointAddTweak();                        // return ignored (-1 on failure)
  const newKey = X_ONLY_PUBLIC_KEY_INPUT.slice(0, validate.X_ONLY_PUBLIC_KEY_SIZE);
  return compare(newKey, resultToCheck) === 0;      // stale buffer = the input itself
}

x_only_point_add_tweak in lib.rs returns -1 and leaves X_ONLY_PUBLIC_KEY_INPUT untouched when the tweak addition fails. The fix refactors to remove throw_error calls in the wasm surface so every failure returns a proper code and the check handles it.


1. Root cause

x_only_point_add_tweak (Rust/wasm) returns -1 when secp256k1_xonly_pubkey_tweak_add fails — notably when P + G·t lands on the point at infinity. The JS wrapper discarded that return value and compared X_ONLY_PUBLIC_KEY_INPUT (which still holds the original point) against the caller-supplied resultToCheck. Passing the input as its own claimed result therefore yields true for a derivation that failed: with point = G and tweak = n−1 (the largest valid tweak), the result is the point at infinity and the check still reports success. The fix removes the wasm throw_error paths so failures return proper codes and the check evaluates the real derivation result.

2. Reproduction environment

serviceimagerole
ecc-vulncve-2026-107853:vulntiny-secp256k1 2.2.4 from npm
ecc-fixedcve-2026-107853:fixedtiny-secp256k1 2.2.5 from npm (vendor fix)
poccve-2026-107853-poc:localstdlib-only Python driver

The harness calls the real xOnlyPointAddTweakCheck(G, n−1, G) — the generator point as both input and claimed result, with the largest valid tweak n−1 whose addition produces the point at infinity and therefore fails. Both sides differ only in the npm package version.

3. Running the environment

./run-lab.sh build     # installs 2.2.4 / 2.2.5 from npm (node:22-alpine)
./run-lab.sh up        # cve107853lab network: ecc-vuln / ecc-fixed
./run-lab.sh sweep
./run-lab.sh down

4. The PoC

poc/poc.py (stdlib only):

  • check — exit 1 when the invalid derivation is accepted (true), 0 when the failed derivation returns false; 3 no worker, 2 unreachable/indeterminate.
  • exploit — narrated chain: crafted infinity-tweak derivation → wasm failure → stale-buffer comparison → true for the invalid case.
  • probe — verdict and vulnerable flags.
  • mitigation — 2.2.5 / commit ba1af1fc / failure-code refactor.

A standalone full-chain exploit ships at exploit/exploit.py:

python3 exploit/exploit.py --host=ecc-vuln
# exit 1 on confirmed invalid-derivation acceptance, 0 on a safe target

5. Expected results

callecc-vuln (2.2.4)ecc-fixed (2.2.5)
xOnlyPointAddTweakCheck(G, n−1, G) (derivation fails)true — invalid derivation acceptedfalse — failure handled

Captured runs: evidence/check-*-run.txt, evidence/exploit-*-run.txt, evidence/probe-*-run.txt, evidence/mitigation-*-run.txt, evidence/exploit-standalone-run.txt, evidence/exploit-standalone-fixed-run.txt, evidence/versions.txt, evidence/0day-sweep.txt.

6. Environment preconditions

  • Podman (or Docker); bounded containers on the isolated cve107853lab network; node:22-alpine + npm.
  • Real-world impact applies to consumers that rely on xOnlyPointAddTweakCheck to validate tweaked output keys against attacker-influenced (point, tweak, result) triples — e.g. taproot key-spend validation flows.

7. Additional findings (0-day sweep on the fixed line)

The same commit ba1af1fc removes throw_error calls across the whole wasm surface so every failure path returns a proper code. The four-argument path (explicit tweakParity) already compared the wasm return value and was not affected. The fix also bumps the package version metadata so dependents pin 2.2.5.

8. Repository layout

README.md             this write-up
run-lab.sh            environment driver (build / up / sweep / down)
Makefile              convenience targets
poc/poc.py            the PoC (check / exploit / probe / mitigation)
exploit/exploit.py    standalone full-chain exploit
lab/lab.Dockerfile    installs tiny-secp256k1 2.2.4 / 2.2.5 from npm
lab/test.js           the real xOnlyPointAddTweakCheck invocation
lab/harness.sh        node runner
lab/service.py        HTTP wrapper (POST /check)
evidence/             captured runs of every mode on both sides
TRACKING.md           excluded (working record)

9. References

  • CVE record — https://www.cve.org/CVERecord?id=CVE-2026-107853
  • GitHub advisory — https://github.com/bitcoinjs/tiny-secp256k1/security/advisories/GHSA-hj9c-qx2w-g7mh
  • Fix commit — https://github.com/bitcoinjs/tiny-secp256k1/commit/ba1af1fceea95967a172c6438ed9302730bb7c01
  • Fixed release — tiny-secp256k1 2.2.5
Download Tool