Skip to content

Security: XChain-Platform/xchain-encoder

Security

SECURITY.md

Security Policy

xchain-encoder takes an ACTION string, a set of UTXOs, and a public key, and returns an unsigned PSBT for the caller to sign and broadcast. It builds transactions that move real value: a flaw in encoding, PSBT construction, or fee calculation can produce a transaction that misdirects funds or encodes the wrong action. We treat reports seriously and respond fast.

If you've found a security issue, please do not open a public issue or pull request. Use the private channels below.


How to report

Preferred: GitHub Private Vulnerability Reporting

Open a draft advisory at:

https://github.com/XChain-Platform/xchain-encoder/security/advisories/new

This is the fastest path. The advisory is private until we publish it.

Alternative: Email

Email security@dankest.llc with:

  • A description of the issue and the threat it poses.
  • Reproduction steps or a proof-of-concept (a crafted input, payload, or API call that triggers the bug).
  • The affected version (see CHANGELOG.md and the version badge in README.md) and the network you tested against (mainnet / testnet / regtest, and which chain).
  • Any patches or mitigations you'd like considered.

For sensitive reports, encrypt the email body to our PGP key. The fingerprint will be published alongside the first signed release artifact; until then, the email channel is acceptable for first contact and we will coordinate an encrypted exchange before you share proof-of-concept details.

We do not currently offer a paid bug bounty. We do offer public credit in release notes and the advisory itself, unless you prefer to remain anonymous.


Response timeline

Stage Target
Initial acknowledgement within 72 hours
Triage + severity assignment within 7 days
Fix or mitigation in master within 30 days for high/critical, 90 days for lower severities
Coordinated public disclosure up to 90 days from initial report, or sooner if a fix has shipped and operators are protected

If we cannot meet a timeline, we will tell you why and propose a new one. We will not silently let a report age.


Scope

In scope

  • ACTION encoding correctness across all four formats (OP_RETURN, P2SH, P2WSH, multisig): a wrong encoding silently produces an undecodable or misinterpreted transaction.
  • PSBT construction: inputs, outputs, amounts, and change address handling; any path where the wrong inputs are selected or the wrong value reaches an output.
  • Fee calculation and the fee-rate cap logic (MAX_FEE_RATE_MULTIPLIER, MAX_FEE_RATE_KB): a bypass could drain inputs into miner fee.
  • The encoder HTTP JSON-RPC API (npm run api): injection, auth bypass, rate-limit bypass, or denial-of-service via crafted requests.
  • The browser bundle (dist/xchain_encoder.min.js) produced by npm run build, including supply-chain integrity of that artifact.
  • Any path where a malformed or adversarial input yields a valid-looking but wrong transaction (wrong recipient, wrong amount, wrong action).

Out of scope

  • How the caller signs or broadcasts the PSBT (that is the wallet's or caller's responsibility); we do not control signing.
  • Vulnerabilities in the underlying coin nodes (bitcoind / litecoind / dogecoind); report those to their respective projects.
  • Compromise of upstream npm dependencies (we mitigate via audit + review, but a backdoor in a dep is the dep author's incident, though we still want to hear about it).
  • Misconfiguration of the operator's own network exposure (for example, binding the API to a public interface without a firewall or authentication).
  • Attacks that require the operator's host credentials or shell access to the encoder host.
  • The user's key management and signing environment.

If you are unsure, send the report anyway and we will tell you whether it falls in scope.


What we ask

  • Give us a reasonable window to fix before disclosing publicly. The 90-day ceiling is firm; earlier is fine once a fix has shipped and operators are protected.
  • Test against regtest or testnet where possible (the xchain-regtest-miner plus a local stack make this easy). Mainnet proofs-of-concept are accepted but should be the minimum needed.
  • Do not run automated scanners against shared XChain infrastructure in a way that would impact availability for other operators.
  • Do not access data, or attempt to access data, beyond what is needed to demonstrate the issue.

What we will do

  • Confirm receipt within the SLA above.
  • Keep you informed as triage and remediation proceed.
  • Credit you in the advisory and CHANGELOG.md entry, on request.
  • Coordinate a CVE assignment when the severity warrants it.
  • Publish a post-fix advisory describing the issue, the fix, and the affected version range.

Versions covered

We ship security fixes against the latest release on master. Older releases are unsupported. The current version is recorded in CHANGELOG.md and the badge in README.md.


Last reviewed: 2026-06-16.

There aren't any published security advisories