Skip to content

flake: update pins for the clightning, Node.js, BTCPay and Go security releases - #125

Merged
prusnak merged 1 commit into
bitcoinix:masterfrom
ostermayer:pin-update-2026-10-22
Oct 23, 2026
Merged

prusnak merged 1 commit into
bitcoinix:masterfrom
ostermayer:pin-update-2026-10-22

Conversation

@ostermayer

@ostermayer ostermayer commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #120. Refs #121.

This is a helper/update-flake.sh run plus the follow-up changes it needs. The stable input moves to 2026-10-21 and the unstable input to 2026-10-20.

Package Before After
clightning 26.04.1 (stable) 26.06.9 (unstable)
clnrest 0.2.0 0.2.0, new cargoHash for the 26.06.9 source
btcpayserver 2.4.2 (stable) 2.4.5 (unstable)
nbxplorer 2.6.10 (stable) 2.6.17 (unstable)
nodejs 22 (rtl, mempool) 22.23.3 22.23.4
lnd 0.21.4-beta, Go 1.26.8 0.21.4-beta, Go 1.26.9
clboss 0.17.0 0.17.2
lndinit 0.1.22-beta (stable) 0.1.38-beta (unstable)
extra-container 0.14 (stable) 0.17 (unstable)
electrs 0.11.0 0.11.0, held on stable
bitcoind 31.1 31.1

Why now: clightning 26.06.7 to 26.06.9 fix fund loss bugs, remote crashes, unauthenticated clnrest crashes and a rune restriction bypass (#120), and Node.js 22.23.4 fixes CVE-2026-111497, an out of bounds write in the Brotli decoder that RTL reaches before login (#121). BTCPay 2.4.3 is a security release, and Go 1.26.9 fixes crypto/tls and net/http, which lnd's REST and gRPC servers use.

Follow-up changes in the same commit:

  • pkgs/python-packages/pyln-proto: clightning 26.06.9 depends on the coincurve-cp314-fix fork, so the patch now points it back to coincurve and relaxes the version bound, as nixpkgs does. All five clightning plugins, trustedcoin and clboss build.
  • BTCPay Server 2.4.5 blocks webhooks, invoice notification URLs and LNURL requests to private addresses by default. The internal Lightning node that bitcoinix configures isn't affected, but operators who need private destinations now have a 0.1.2 versioning entry and a docs section that show BTCPAY_SSRFEXCEPTIONS.
  • electrs stays on 0.11.0. The script moved it to 0.12.0, but that version needs bitcoind's REST interface and a full reindex, so it's a separate change with its own versioning entry, and I moved electrs back to the stable list by hand. The next script run will move it again until that lands.

Checked: the only createrune call in the tree (modules/clightning-plugins/clnrest.nix) goes over the RPC socket, so the new rune restriction doesn't affect it, and nothing uses listconfigs or setconfig. nix flake check --no-build passes.

Scenarios on a KVM host from a fresh clone, all passed: default, regtest, netnsRegtest, clightning-replication and trustedcoin.

Models used on this PR: Fable 5.1 for the plan and the review, and Opus 5.5 for the change. GPT-6 Astra at xhigh reasoning reviewed the diff and found the BTCPay 2.4.5 private address block, which the versioning entry now covers. DeepSeek V4.1 Flash 1017 and GLM 5.3, both at max thinking, reviewed the tree of this revision and found nothing in the files this PR touches. Their findings elsewhere are master code that open issues already track.

@github-actions github-actions Bot added area: ci .github/, test/, dev/ area: docs docs/, README, examples/, SECURITY.md, book.toml, assets area: modules modules/ and pkgs/lib.nix area: packages pkgs/ and flake pins labels Oct 23, 2026
@prusnak
prusnak requested a review from seberm October 23, 2026 08:29
@seberm seberm mentioned this pull request Oct 23, 2026
@prusnak

prusnak commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

i know that @seberm wanted to update the flake and release new version of bitcoinix with these updates

we also need to pay special attention in release notes if we include the electrs update (requires resync), but this PR does not include it in its current form

@seberm

seberm commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

@prusnak I think we can both review this one (keep electrs on v0.11.0) and add a follow-up changes for electrs (I already have some changes prepared). For electrs v0.12 it's not just re-index, but we must also add support for bitcoind REST:

We should check if there are any other breaking changes in this update. So far, I'm not aware of any other than electrs.

@prusnak

prusnak commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

@ostermayer CI fails on the check_flake test - not sure what is going on

@seberm

seberm commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

@ostermayer thanks for this. The red check_flake comes from the test/nixos-search/flake.lock bump: the new nixos-search pin makes CI build its patched nix-2.34.8+1 (used by flake-info) from source, and a test in Nix's own suite fails there (ca/new-build-cmd), so flake-info and then check_flake fail. It failed again on a rerun. The bitcoinix changes in this PR are fine, and master's nixos-search pin passes.

Could you drop the test/nixos-search/flake.lock change from this PR and keep master's version? We'll bump it in a separate, low-priority follow-up, since it's only test tooling and not shipped code.

@seberm

seberm commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Update: the rerun passed, and the same flake-info build also passes locally, so the ca/new-build-cmd failure was a flaky Nix test. Probably no need to drop the test/nixos-search/flake.lock change. Sorry for the noise.

@seberm seberm mentioned this pull request Oct 23, 2026
2 tasks done
prusnak added a commit that referenced this pull request Oct 23, 2026
electrs 0.12 reads blocks through bitcoind's REST interface, so bitcoind
needs
`rest=1`. This adds `services.bitcoind.rest.enable` (default off) ahead
of the
electrs 0.12 update.

REST is served on the RPC address and port **without authentication**.
It bypasses
RPC users and `rpcwhitelist`, and Bitcoin Core 31 has no separate REST
bind or
allowlist. `rpcallowip` is the only access control (bitcoind checks it
for every HTTP
request, REST included). To keep REST from reaching beyond the node,
evaluation fails
when REST is enabled and `rpc.allowip` contains sources other than
localhost and the
netns-isolation addresses. Users who expose RPC to their LAN must opt in
with
`services.bitcoind.rest.allowNonLocal = true`.

Who can reach REST once it is enabled:
- with netns isolation: the namespaces connected to bitcoind (they
already have RPC
credentials) and the host through the bridge, i.e. any local user on the
host
- without netns isolation: localhost, i.e. any local user

REST is read-only (blocks, transactions, UTXO set, mempool; no wallet
access). The
remaining local exposure is unauthenticated read access and the load of
heavy requests
such as `/rest/getutxos`.

The bitcoind service sandbox is unchanged. Nothing changes unless the
option is
enabled, so there is no versioning entry.

Tests:
- Nix: the test config is re-evaluated with REST and a LAN `rpc.allowip`
source. The
  assertion must fail, and pass with `rest.allowNonLocal`.
- New `bitcoind-rest` VM test: `/rest` returns 404 when disabled. When
enabled, it is
reachable from the host as an unprivileged user and, with netns
isolation, not from
namespaces without a bitcoind connection. REST is enabled in the
`regtest` scenario,
  so CI covers both states (`default`/`netns`: off, `netnsRegtest`: on).

Ran `default`, `netns` and `netnsRegtest` locally: all passed.


Also partially related to:
- #125
-
#7 (comment)
…y releases

Run helper/update-flake.sh. nixpkgs (nixos-26.05) moves to 2026-10-21,
nixpkgs-unstable to 2026-10-20 and flake-utils to 2026-10-13. The
nixos-search test flake is updated too.

Versions:

  clightning      26.04.1 (stable)       -> 26.06.9 (unstable)
  clnrest         0.2.0, cargoHash updated for the 26.06.9 source
  btcpayserver    2.4.2 (stable)         -> 2.4.5 (unstable)
  nbxplorer       2.6.10 (stable)        -> 2.6.17 (unstable)
  nodejs 22       22.23.3                -> 22.23.4 (stable, rtl and mempool)
  lnd             0.21.4-beta, Go 1.26.8 -> Go 1.26.9 (unstable)
  clboss          0.17.0                 -> 0.17.2
  lndinit         0.1.22-beta (stable)   -> 0.1.38-beta (unstable)
  extra-container 0.14 (stable)          -> 0.17 (unstable)
  bitcoind        31.1, unchanged

Security reasons:

- clightning 26.06.7 to 26.06.9 fix fund loss bugs, remote crashes,
  clnrest crashes from unauthenticated requests, and a rune restriction
  bypass. Fixes bitcoinix#120
- Node.js 22.23.4 fixes CVE-2026-111497, a Brotli decoder out of bounds
  write that RTL reaches before login. Refs bitcoinix#121
- BTCPay Server 2.4.3 is a security release. Refs bitcoinix#121
- Go 1.26.9 fixes crypto/tls and net/http, which the lnd REST and gRPC
  servers use. Refs bitcoinix#121

pyln-proto 26.06.9 depends on the coincurve-cp314-fix fork. Patch it back
to coincurve like nixpkgs does and relax the version bound.

BTCPay Server 2.4.5 blocks webhooks, invoice notification URLs and LNURL
requests to private addresses by default. Add a versioning entry and a docs
section that show how to allow them with BTCPAY_SSRFEXCEPTIONS. The internal
Lightning node that bitcoinix configures isn't affected.

Keep electrs on stable (0.11.0). The script moved it to unstable 0.12.0,
which needs the bitcoind REST interface and a full reindex. That needs its
own change with a versioning entry.

Scenarios, all passed on the KVM host:

  test/run-tests.sh -s default build
  test/run-tests.sh -s regtest build
  test/run-tests.sh -s netnsRegtest build
  test/run-tests.sh -s clightning-replication build
  test/run-tests.sh -s trustedcoin build
@ostermayer
ostermayer force-pushed the pin-update-2026-10-22 branch from c099728 to a58ec68 Compare October 23, 2026 15:50
@seberm

seberm commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

@prusnak LGTM

@ostermayer Thanks for the changes!


Two small things for a follow-up PR, if you have time:

  1. The BTCPay SSRF example 127.0.0.1:8080 is lnd's default REST port, so copying it lets anyone who can set a webhook, notification URL or Lightning address make BTCPay send requests to lnd REST. Please use a neutral LAN example (e.g. 192.168.1.50:8443) in both docs/configuration.md and the 0.1.2 versioning message, and add to the docs that exceptions should be as narrow as possible (never ports of node services), and that a hostname entry trusts every address it resolves to, so only hostnames whose DNS you control belong there.

  2. "The internal Lightning node is unaffected" isn't covered by a test yet: the btcpayserver test curls lnd itself, so BTCPay's own HTTP client never runs. A Greenfield check in netnsRegtest would cover it: create the first admin user, then GET /api/v1/server/lightning/BTC/info and GET /api/v1/health (synchronized: true).

@prusnak
prusnak merged commit a84d98c into bitcoinix:master Oct 23, 2026
12 checks passed
@seberm seberm added breaking Changes existing user config; needs a versioning.nix entry type: security Hardening or vulnerability (public-safe only) labels Oct 23, 2026
seberm added a commit that referenced this pull request Oct 25, 2026
test/nixos-search/ci-test.sh pushed its flake-info build to Cachix when
CACHIX_SIGNING_KEY was set. Since #71 scoped the key to build_test_drivers
and test_scenario, check_flake no longer has it, so nothing pushes
flake-info. The cached build stopped matching when #125 bumped the
nixos-search input, and since then every check_flake run builds flake-info
and a patched Nix from source, including Nix's test suites: 28-29 min
instead of about 1 min on master.

check_flake now builds flake-info in its own step and pushes it from a
separate step that runs only on pushes to master and is the only step that
gets the key. Both run before ci-test.sh, so flake-info, which ci-test.sh
runs outside the Nix build sandbox, runs only after the key step.
ci-test.sh no longer pushes.

Assisted-by: Claude Code (claude-opus-5-5)
msgilligan pushed a commit to msgilligan/bitcoinix that referenced this pull request Nov 8, 2026
test/nixos-search/ci-test.sh pushed its flake-info build to Cachix when
CACHIX_SIGNING_KEY was set. Since bitcoinix#71 scoped the key to build_test_drivers
and test_scenario, check_flake no longer has it, so nothing pushes
flake-info. The cached build stopped matching when bitcoinix#125 bumped the
nixos-search input, and since then every check_flake run builds flake-info
and a patched Nix from source, including Nix's test suites: 28-29 min
instead of about 1 min on master.

check_flake now builds flake-info in its own step and pushes it from a
separate step that runs only on pushes to master and is the only step that
gets the key. Both run before ci-test.sh, so flake-info, which ci-test.sh
runs outside the Nix build sandbox, runs only after the key step.
ci-test.sh no longer pushes.

Assisted-by: Claude Code (claude-opus-5-5)
@ostermayer
ostermayer deleted the pin-update-2026-10-22 branch November 8, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci .github/, test/, dev/ area: docs docs/, README, examples/, SECURITY.md, book.toml, assets area: modules modules/ and pkgs/lib.nix area: packages pkgs/ and flake pins breaking Changes existing user config; needs a versioning.nix entry type: security Hardening or vulnerability (public-safe only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

clightning: the 26.04.1 pin lacks the security fixes in 26.06.7 to 26.06.9

3 participants