LD
← All projectsLedger

Ledger Bitcoin app

Open-source Bitcoin application running on Ledger devices; the device OS is outside this repository.

BitcoinHardware walletsNormal
Repository coverage

447 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

148security candidates154second-pass queue402AI analyses
19commits · 30 days
63commits · 60 days
249commits · 180 days
414commits · 365 days
Backfill bands
Aug 5 → Feb 670 seen8 candidatesComplete
Feb 6 → Jun 6149 seen21 candidatesComplete
Jun 6 → Jul 623 seen0 candidatesComplete
Jul 6 → Aug 555 seen5 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

57/100 average clarity
50Strong · 80–100
152Adequate · 60–79
186Thin · 40–59
59Opaque · 0–39
6security candidates with opaque commit messaging
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
Salvatore Ingala2981122561062
Ilya Artemov962696145
Ruben Waterman666083
Aymeric Robert434063
github-actions[bot]17117046
Mathias BROUSSET17015039
José Luis Landabaso Díaz404067
iartemov-ledger201051
Cerberus Merlin101062
Michael Evans101073
Charles-Edouard de la Vergne101045
Analysis record

Published AI watches

Last scanned 48 minutes ago

Informational 20 AI analysisMessage 83 · Strong
LD LedgerLedger Bitcoin app BitcoinHardware wallets

tests: pin all Python test dependencies to exact versions

This commit pins the exact versions of Python testing tools used by the project's automated tests. Previously, the test setup allowed any newly released version of those tools to be installed automatically, which could introduce unexpected…

Supply-chain risk reduction for test/CI dependenciesPrevents unreviewed automatic upgrades of speculos and raggerNo change to firmware or published package code
def417a3by Salvatore Ingala+329−142 files
No security note in commit
Informational 15 AI analysisMessage 38 · Opaque
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Bump version to 2.6.0

This commit is a routine version bump from 2.5.1 to 2.6.0 in the Ledger Bitcoin app. It only updates the version number in the Makefile and the release date in the CHANGELOG. There are no code changes, no bug fixes, and no security-related…

2b424b54by Salvatore Ingala+4−42 files
No security note in commit
Moderate 66 AI analysisMessage 68 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Merge pull request #581 from LedgerHQ/client-fixes

This commit tightens how the Ledger Bitcoin app and its companion client libraries read PSBT (Partially Signed Bitcoin Transaction) data. It adds checks that reject malformed or suspicious PSBTs: truncated fields, unexpected extra bytes af…

Hardened PSBT deserialization against truncation and trailing dataAdded duplicate-key detection in PSBT mapsRejected PSBTv2-only fields inside PSBTv0 to prevent locktime/field override attacks
f8f790a3by Salvatore Ingala+544−17018 files
No security note in commit
Low 47 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

python client: reject PSBTv2-only fields in a PSBTv0

This commit tightens input validation in the Python helper library that prepares Bitcoin transaction data for Ledger hardware wallets. It now rejects PSBT files that claim to be the older version 0 format but contain fields that only belon…

Input-validation hardening: stricter parsing of PSBT version 0 to reject v2-only key typesConsistency fix across clients: aligns Python client with HS and Rust client behaviorLocktime normalization during v0-to-v2 conversion to prevent per-input locktime from overriding transaction locktime
84165be7by Salvatore Ingala+92−02 files
No security note in commit
Informational 24 AI analysisMessage 83 · Strong
LD LedgerLedger Bitcoin app BitcoinHardware wallets

tests: update authproxy.py to the latest version from Bitcoin Core

This commit updates a test helper file used to talk to a Bitcoin node during automated testing. The old helper could accidentally send the same command twice if the network connection hiccuped, which could cause a test-only action like sen…

Removed transparent retry of non-idempotent RPC requests after connection resetsTest helper could execute state-changing RPCs twice before the fixNew connection-per-call configuration mitigates idle-timeout disconnects without retry risk
c7ca508eby Salvatore Ingala+91−522 files
Vendor flagged security relevance
Low 40 AI analysisMessage 65 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Reject duplicate keys and trailing data when parsing a PSBT in the JS client

This commit fixes the JavaScript PSBT (Partially Signed Bitcoin Transaction) parser in Ledger's Bitcoin app so it now rejects malformed PSBTs that contain duplicate keys or extra trailing bytes. Previously, such malformed data could be acc…

BIP-174 non-compliance: duplicate keys and trailing data were previously acceptedState reuse bug: deserializing multiple PSBTs in the same instance could merge mapsInput validation gap in client-side PSBT parsing
4942a4aeby Salvatore Ingala+40−02 files
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

ragger: fail if a request succeeds without showing the expected screens

This commit fixes the automated test harness, not the Ledger Bitcoin app itself. Previously, the test framework could silently pass even when the device completed a request without showing the expected on-screen review. The change makes te…

Test-hardening only: no firmware or runtime application code changedFixes false-negative test results where a request could succeed without expected UI reviewCorrects scope of navigation settings to avoid leaking across nested or subsequent calls
202d352aby Salvatore Ingala+76−957 files
No security note in commit
Low 37 AI analysisMessage 88 · Strong
LD LedgerLedger Bitcoin app BitcoinHardware wallets

unit tests: Fix length overflow in unit-test PSBT parser

This commit fixes an arithmetic overflow bug in a test-only PSBT (Bitcoin transaction format) parser used in unit tests. The bug could let a crafted test input make the parser think a data length is huge, potentially confusing the mock dis…

Integer overflow/wrap-around in length calculationOut-of-bounds length derived from arithmetic on attacker-influenced offsetsUnit-test-only code path, not device firmware
6a2a9262by Salvatore Ingala+6−21 file
No security note in commit
Low 48 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

rust client: reject PSBTv2-only fields when converting a PSBTv0

This commit fixes a bug in the Ledger Bitcoin app's Rust client where a PSBT v0 (an older transaction format) could silently carry fields that only have meaning in PSBT v2. When converting v0 to v2, those fields could override values taken…

Input validation added for cross-format PSBT conversionPrevents v2-only fields from overriding unsigned-transaction-derived valuesBIP-370 compliance enforcement for PSBTv0
602055d6by Salvatore Ingala+66−91 file
No security note in commit
Moderate 51 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Reject PSBTv2-only fields when converting a PSBTv0 in the JS client

This commit fixes a bug in the Ledger Bitcoin app's JavaScript client library. When converting an older-style Bitcoin transaction file (PSBT version 0) into the newer PSBT version 2 format, the library previously ignored fields that are on…

Input validation fix: rejects malformed PSBTv0 containing v2-only fieldsPrevents silent override of transaction locktime during PSBTv0-to-v2 conversionAdds missing BIP-370 key type constants for required time/height locktime
a1f6dc84by Salvatore Ingala+66−22 files
No security note in commit
High 72 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Reject duplicate keys and truncated maps when parsing PSBT maps in sign_psbt

This commit fixes a bug in how the Ledger Bitcoin app client parses PSBT (Partially Signed Bitcoin Transaction) maps. Previously, if the same key appeared twice in a map, the parser silently kept the last value. A malicious or malformed PS…

Silent overwrite of duplicate PSBT map keys could create commitment mismatch between client and deviceTruncated PSBT maps were silently accepted due to exception swallowing in deserialization loopsTrailing data after PSBT maps was ignored, allowing reserialization to silently normalize malformed inputs
75df80f9by Salvatore Ingala+107−104 files
Vendor flagged security relevance
High 72 AI analysisMessage 53 · Thin
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Merge pull request #579 from LedgerHQ/misc-fixes

This commit fixes several bugs in Ledger's Bitcoin app. The most serious ones are: (1) a set of miniscript policy analyzer mistakes that could let the app accept Bitcoin wallet policies whose scripts are too large or too expensive to execu…

Miniscript cost/property analysis errors that could allow oversized/undercosted wallet policiesHost-driven infinite-loop / denial-of-service via zero-length GET_MORE_ELEMENTS responsesUI state inconsistency causing a security warning to be prematurely dismissed
ec389348by Salvatore Ingala+413−3113 files
No security note in commit
Low 26 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Merge pull request #576 from LedgerHQ/musig2_improvements

This commit improves the Ledger Bitcoin app's MuSig2 multi-signature feature. It lets wallet software pre-generate public nonces before a transaction is known, adds an optional MUSIG2_SESSION_ID field so multiple signing sessions can be in…

New PSBT proprietary field parsing with length validation (1-32 bytes, empty rejected)Session ID now commits to wallet policy plus optional MUSIG2_SESSION_IDSession storage limit raised from 8 to 32 with LRU eviction
26d22adcby Salvatore Ingala+710−7216 files
No security note in commit
Informational 18 AI analysisMessage 85 · Strong
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Use signed scratch arrays in the thresh ops and stack size computations

This commit is a small code cleanup in Ledger's Bitcoin app. It changes two local arrays from unsigned (uint16_t) to signed (int16_t) in functions that count operations and stack sizes for Bitcoin miniscript 'thresh' policies. The commit m…

Signed/unsigned type mismatch in sentinel handlingPotential latent integer interpretation bug in miniscript threshold policy analysisCode clarity improvement around invalid (dis)satisfaction markers
4ff6f2f0by Salvatore Ingala+4−41 file
No security note in commit
Low 48 AI analysisMessage 91 · Strong
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Align miniscript type and ops computations with bitcoin-core

This commit fixes the Ledger Bitcoin app's internal checker for Miniscript wallet policies. The checker was incorrectly rejecting some valid Bitcoin spending policies as unsafe, and in a few places it was computing safety properties using …

Logic change in Miniscript policy analysisAlignment with upstream Bitcoin Core reference implementationRelaxation of overly strict non-malleability and timelock-mixing checks
4694d317by Salvatore Ingala+26−132 files
No security note in commit
Moderate 68 AI analysisMessage 86 · Strong
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Fix ops computation for andor fragments

This commit fixes a bug in how the Ledger Bitcoin app counts the number of Bitcoin script operations (ops) needed to spend certain wallet policies that use a 'miniscript andor' fragment. Because the count was wrong, the app could allow use…

Incorrect miniscript ops accounting for andor fragmentPolicy sanity check bypass leading to unspendable registered walletsReference alignment with Bitcoin Core implementation
86159d1eby Salvatore Ingala+40−13 files
Vendor flagged security relevance
High 74 AI analysisMessage 78 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Fix ops computation for l: and u: fragments

This commit fixes a bug in how the Ledger Bitcoin app counts Bitcoin script operations ('ops') for two specific Miniscript fragments, 'l:' and 'u:'. Because the count was too low, the app could accept wallet policies that look valid but ar…

Undercounting of script operation budget leading to acceptance of unspendable policiesIncorrect handling of Miniscript wrapper dissatisfaction semanticsPolicy sanity check bypass via operation-count accounting flaw
b6ac1de8by Salvatore Ingala+39−33 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 68 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

doc: document the MUSIG2_SESSION_ID PSBT field

This commit only updates documentation and the changelog. It explains a new optional PSBT field called MUSIG2_SESSION_ID that lets software wallets manage multiple MuSig2 signing sessions for the same wallet policy on a Ledger device. Ther…

8d8ed9afby Salvatore Ingala+28−62 files
No security note in commit
Informational 15 AI analysisMessage 78 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

musig_sessions: store up to 32 sessions

This commit is a simple capacity increase, not a security fix. It raises the number of simultaneous MuSig2 signing sessions the Ledger Bitcoin app can keep in memory from 8 to 32, because users with multiple MuSig accounts or wallets that …

a6798172by Salvatore Ingala+12−54 files
No security note in commit
Low 26 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

sign_psbt: fail before the UI if the MuSig2 session is missing

This commit improves the user experience and error handling for Ledger's Bitcoin app when using MuSig2 multi-signatures. Previously, if a required MuSig2 session was missing during the second round of signing, the device would only report …

UX-hardening: fail-fast before user approval instead of afterNew specific error code EC_SIGN_PSBT_MUSIG2_SESSION_NOT_FOUND for missing MuSig2 sessionsRefactored session storage lookup to support non-destructive existence check
2d04b144by Salvatore Ingala+118−187 files
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Security candidatetests: pin all Python test dependencies to exact versionsby Salvatore Ingala · def417a3 · Nov 9, 2026 · 2 filesMessage 83 · StrongInformational 20Details
Commit message · Salvatore Ingala

tests: pin all Python test dependencies to exact versions

requirements.txt used version ranges (with no upper bound for speculos
and ragger), so every CI run could install a newly published release
of any direct or transitive dependency without review.

Move the ranges to requirements.in, and generate requirements.txt from
it with uv, pinning every package to an exact version:

uv pip compile requirements.in --universal --python-version 3.9 -o requirements.txt

--python-version 3.9 matches the oldest Python in CI (the speculos:0.25.5
image of the legacy app job); --universal keeps the lock valid for the
newer versions in ledger-app-dev-tools.

Hashes are intentionally not generated: pip rejects the editable
./bitcoin_client requirement in hash-checking mode, which would require
installing the client separately in every job and in the setup script.

The published ledger_bitcoin package is not affected, as its
dependencies come from bitcoin_client/setup.cfg.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
access control
AI analysis · Informational 20/100

This commit pins the exact versions of Python testing tools used by the project's automated tests. Previously, the test setup allowed any newly released version of those tools to be installed automatically, which could introduce unexpected changes or malicious code from a compromised dependency into the CI/test environment. Pinning versions is a routine supply-chain hygiene improvement; it does not fix a known vulnerability in the app itself.

AI review queuedBump version to 2.6.0by Salvatore Ingala · 2b424b54 · Nov 5, 2026 · 2 filesMessage 38 · OpaqueInformational 15Details
Commit message · Salvatore Ingala

Bump version to 2.6.0

38/100 · OpaqueMessage clarity
✓ Subject identifies a change✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 15/100

This commit is a routine version bump from 2.5.1 to 2.6.0 in the Ledger Bitcoin app. It only updates the version number in the Makefile and the release date in the CHANGELOG. There are no code changes, no bug fixes, and no security-related modifications in the diff itself.

Security candidateMerge pull request #581 from LedgerHQ/client-fixesby Salvatore Ingala · f8f790a3 · Nov 5, 2026 · 18 filesMessage 68 · AdequateModerate 66Details
Commit message · Salvatore Ingala

Merge pull request #581 from LedgerHQ/client-fixes

Miscellaneous client and test fixes

68/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
Why it was queued
signing or wallet pathauthentication pathmerge-commit duplicate discount
AI analysis · Moderate 66/100

This commit tightens how the Ledger Bitcoin app and its companion client libraries read PSBT (Partially Signed Bitcoin Transaction) data. It adds checks that reject malformed or suspicious PSBTs: truncated fields, unexpected extra bytes after the PSBT, duplicate keys inside PSBT maps, and PSBTv0 files that contain fields only allowed in PSBTv2. It also fixes a C-language integer-overflow check when parsing PSBT maps on the device. These changes are defensive hardening: they prevent the client/device from silently accepting a malformed or intentionally crafted PSBT that could later influence transaction details such as locktime.

Security candidatepython client: reject PSBTv2-only fields in a PSBTv0by Salvatore Ingala · 84165be7 · Nov 5, 2026 · 2 filesMessage 73 · AdequateLow 47Details
Commit message · Salvatore Ingala

python client: reject PSBTv2-only fields in a PSBTv0

Similarly to the HS and Rust client, make the python client reject
deserializing PSBTs of version 0 if they contain v2-only fields.

Also clear the required locktimes in convert_to_v2(), as the locktime
of a PSBTv0 is defined by its unsigned transaction.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 47/100

This commit tightens input validation in the Python helper library that prepares Bitcoin transaction data for Ledger hardware wallets. It now rejects PSBT files that claim to be the older version 0 format but contain fields that only belong to the newer version 2 format, and it makes sure lock-time values are taken from the original transaction when converting an old PSBT to the new format. The change brings the Python client in line with the existing hardware-side (HS) and Rust clients. It is a defensive consistency fix rather than a confirmed exploit patch.

Security candidatetests: update authproxy.py to the latest version from Bitcoin Coreby Salvatore Ingala · c7ca508e · Nov 5, 2026 · 2 filesMessage 83 · StrongInformational 24Details
Commit message · Salvatore Ingala

tests: update authproxy.py to the latest version from Bitcoin Core

The old version transparently resent a request after a connection reset,
which could execute a non-idempotent RPC (e.g. sendtoaddress) twice if the
server had already processed the first one. The latest version no longer
retries.

The retry also handled bitcoind closing idle connections after
-rpcservertimeout, which can happen while tests interact with the device.
Instead, configure the test RPC proxies to use a new connection for each call.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
authentication path
AI analysis · Informational 24/100

This commit updates a test helper file used to talk to a Bitcoin node during automated testing. The old helper could accidentally send the same command twice if the network connection hiccuped, which could cause a test-only action like sending coins to happen twice. The new version removes that automatic retry and instead opens a fresh connection for each test command. This is a test-infrastructure hardening change, not a fix in the Ledger app that users install on their device.

Security candidateReject duplicate keys and trailing data when parsing a PSBT in the JS clientby Salvatore Ingala · 4942a4ae · Nov 5, 2026 · 2 filesMessage 65 · AdequateLow 40Details
Commit message · Salvatore Ingala

Reject duplicate keys and trailing data when parsing a PSBT in the JS client

Now both cases are rejected, improving compliance to BIP-174.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 40/100

This commit fixes the JavaScript PSBT (Partially Signed Bitcoin Transaction) parser in Ledger's Bitcoin app so it now rejects malformed PSBTs that contain duplicate keys or extra trailing bytes. Previously, such malformed data could be accepted, potentially causing the parser to behave inconsistently or mix up data from one PSBT with another. The fix also clears internal state before parsing, so reusing the same parser object does not accidentally keep old data.

Security candidateragger: fail if a request succeeds without showing the expected screensby Salvatore Ingala · 202d352a · Nov 5, 2026 · 7 filesMessage 73 · AdequateInformational 15Details
Commit message · Salvatore Ingala

ragger: fail if a request succeeds without showing the expected screens

The navigation only advanced through the instruction groups while an APDU
was pending, so a request that completed without showing the expected
review was accepted, and its screens were never compared.

Require every instruction group to be navigated when a request succeeds.
The only exception is a final status screen, since the response APDU is
sent before showing it.

A few of the instructions were outdated and contained useless extra
instructions, so they were removed. The silent MuSig2 round 1 is no longer
given the instructions meant for the signing review.

The navigation settings of a call also applied to nested calls (for
example, the address check in register_wallet) and, after an exception,
to later calls. They now apply to the requests of that call only.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 15/100

This commit fixes the automated test harness, not the Ledger Bitcoin app itself. Previously, the test framework could silently pass even when the device completed a request without showing the expected on-screen review. The change makes tests fail if the expected screens are not shown, and it tidies up some test instructions. It does not change the security behavior of the device firmware or the wallet application that users interact with.

Security candidateunit tests: Fix length overflow in unit-test PSBT parserby Salvatore Ingala · 6a2a9262 · Nov 5, 2026 · 1 fileMessage 88 · StrongLow 37Details
Commit message · Salvatore Ingala

unit tests: Fix length overflow in unit-test PSBT parser

Avoid addition that could be larger than UINT64_MAX and wrap around,
causing a bogus length to reach the mock dispatcher.

Also make psbt_parse() reject trailing bytes after the last output map.

88/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
signing boundarymemory safetysigning or wallet path
AI analysis · Low 37/100

This commit fixes an arithmetic overflow bug in a test-only PSBT (Bitcoin transaction format) parser used in unit tests. The bug could let a crafted test input make the parser think a data length is huge, potentially confusing the mock dispatcher in tests. It also adds a check that no unexpected trailing bytes remain after parsing. The fix only affects unit-test code, not the actual Ledger app that runs on devices.

Security candidaterust client: reject PSBTv2-only fields when converting a PSBTv0by Salvatore Ingala · 602055d6 · Nov 4, 2026 · 1 fileMessage 73 · AdequateLow 48Details
Commit message · Salvatore Ingala

rust client: reject PSBTv2-only fields when converting a PSBTv0

Reject all the global, input and output fields that BIP-370 excludes
from PSBTv0, whatever their keydata, before converting to PSBTv2.
This avoids accidentally overwriting the intended value from the
unsigned transaction.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 48/100

This commit fixes a bug in the Ledger Bitcoin app's Rust client where a PSBT v0 (an older transaction format) could silently carry fields that only have meaning in PSBT v2. When converting v0 to v2, those fields could override values taken from the unsigned transaction, potentially changing transaction details such as locktime. The patch now rejects such fields before conversion.

Security candidateReject PSBTv2-only fields when converting a PSBTv0 in the JS clientby Salvatore Ingala · a1f6dc84 · Nov 4, 2026 · 2 filesMessage 73 · AdequateModerate 51Details
Commit message · Salvatore Ingala

Reject PSBTv2-only fields when converting a PSBTv0 in the JS client

Reject all the global, input and output fields that BIP-370 excludes
from PSBTv0 before converting, instead of silently overwriting the
(possibly) intended value.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Moderate 51/100

This commit fixes a bug in the Ledger Bitcoin app's JavaScript client library. When converting an older-style Bitcoin transaction file (PSBT version 0) into the newer PSBT version 2 format, the library previously ignored fields that are only legal in version 2. Those fields could silently override important transaction details, such as when the transaction can be spent (the locktime). The change now rejects such files with an error instead of converting them, preventing accidental or malicious transaction tampering from being hidden.

Security candidateReject duplicate keys and truncated maps when parsing PSBT maps in sign_psbtby Salvatore Ingala · 75df80f9 · Nov 4, 2026 · 4 filesMessage 73 · AdequateHigh 72Details
Commit message · Salvatore Ingala

Reject duplicate keys and truncated maps when parsing PSBT maps in sign_psbt

parse_stream_to_map silently kept the last value of a repeated key, so a
PSBTv2 object whose unknown entries collided with a typed key could make
the client commit to maps different from the typed fields of the object.

Further tightening: also fail on truncated maps and on trailing data
after the PSBT maps in sign_psbt. PSBT.deserialize now rejects trailing
data, missing map separators and truncated strings too: for bytes and
base64 inputs, the PSBT is reserialized before reaching the checks in
sign_psbt, which would drop the trailing data and restore the missing
bytes.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · High 72/100

This commit fixes a bug in how the Ledger Bitcoin app client parses PSBT (Partially Signed Bitcoin Transaction) maps. Previously, if the same key appeared twice in a map, the parser silently kept the last value. A malicious or malformed PSBT could use this to make the device commit to one set of data while the client software saw another, potentially causing the user to sign a transaction different from what they reviewed. The fix also rejects truncated PSBTs and extra trailing data, which could otherwise be silently repaired during reserialization and hide attacks.

AI review queuedMerge pull request #579 from LedgerHQ/misc-fixesby Salvatore Ingala · ec389348 · Nov 2, 2026 · 13 filesMessage 53 · ThinHigh 72Details
Commit message · Salvatore Ingala

Merge pull request #579 from LedgerHQ/misc-fixes

Miscellaneous improvements

53/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · High 72/100

This commit fixes several bugs in Ledger's Bitcoin app. The most serious ones are: (1) a set of miniscript policy analyzer mistakes that could let the app accept Bitcoin wallet policies whose scripts are too large or too expensive to execute safely, and (2) a denial-of-service issue where a malicious computer app could keep the Ledger stuck in a slow loop forever by sending empty data chunks. It also fixes a UI glitch where a warning screen could be accidentally cleared by the next command.

AI review queuedMerge pull request #576 from LedgerHQ/musig2_improvementsby Salvatore Ingala · 26d22adc · Oct 23, 2026 · 16 filesMessage 73 · AdequateLow 26Details
Commit message · Salvatore Ingala

Merge pull request #576 from LedgerHQ/musig2_improvements

MuSig2 improvements for pre-generating nonces

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Low 26/100

This commit improves the Ledger Bitcoin app's MuSig2 multi-signature feature. It lets wallet software pre-generate public nonces before a transaction is known, adds an optional MUSIG2_SESSION_ID field so multiple signing sessions can be in flight for the same wallet, and increases the stored session limit from 8 to 32. It also adds early checks so the device fails fast if a Round 2 session is missing, and rejects malformed session IDs. The changes are defensive and do not appear to introduce a vulnerability.

AI review queuedUse signed scratch arrays in the thresh ops and stack size computationsby Salvatore Ingala · 4ff6f2f0 · Oct 22, 2026 · 1 fileMessage 85 · StrongInformational 18Details
Commit message · Salvatore Ingala

Use signed scratch arrays in the thresh ops and stack size computations

sumcheck() and maxcheck() return -1 for invalid (dis)satisfactions,
which was stored in uint16_t arrays; this wasn't a bug only because it
is later converted back to -1 when read as int16_t.

Using int16_t directly is clearer.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 18/100

This commit is a small code cleanup in Ledger's Bitcoin app. It changes two local arrays from unsigned (uint16_t) to signed (int16_t) in functions that count operations and stack sizes for Bitcoin miniscript 'thresh' policies. The commit message says the old code was not actually buggy because the stored -1 values were later read back as signed -1 anyway, but using signed types directly is clearer and less error-prone.

AI review queuedAlign miniscript type and ops computations with bitcoin-coreby Salvatore Ingala · 4694d317 · Oct 22, 2026 · 2 filesMessage 91 · StrongLow 48Details
Commit message · Salvatore Ingala

Align miniscript type and ops computations with bitcoin-core

Fixes several discrepancies, all making the analysis stricter than
necessary, which could cause valid policies to be rejected:

- and_n(X,Y) is andor(X,Y,0): since 0 has the 's' property, non-
malleability does not require s_X or s_Y; and the dissatisfaction
of Y is never executed, so it does not contribute to the ops count.
- thresh: the timelock mixing check compared each child with the
accumulated timelocks including its own, so a child with different
kinds of timelocks in separate branches was flagged as mixing.

Also aligns the 'e' property of or_b, thresh and d: with bitcoin-core.
This has no effect on the final result, since the computed 'e' only
differed for nodes that are not 'm'.

A previous non-regression test lost its coverage after these changes;
wrapping the child in ltv: makes sure that it has e=1 but m=0, and the
test properly checks that thresh requires all the children to have 'm'.

As a reference, compare with:
https://github.com/bitcoin/bitcoin/blob/3eca89820e1fb152ebf0315e3924fc374cb35958/src/script/miniscript.cpp#L119-L230
https://github.com/bitcoin/bitcoin/blob/3eca89820e1fb152ebf0315e3924fc374cb35958/src/script/miniscript.h#L1046-L1051

Implementation and tests from Claude Opus 5.5.

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
fuzzing or regression evidencesigning or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 48/100

This commit fixes the Ledger Bitcoin app's internal checker for Miniscript wallet policies. The checker was incorrectly rejecting some valid Bitcoin spending policies as unsafe, and in a few places it was computing safety properties using formulas that differ from the reference implementation in Bitcoin Core. The changes make the Ledger app match Bitcoin Core's stricter-but-correct rules. There is no direct evidence in the commit that user funds were at risk of theft; the main effect was that legitimate wallet setups could be wrongly rejected.

AI review queuedFix ops computation for andor fragmentsby Salvatore Ingala · 86159d1e · Oct 22, 2026 · 3 filesMessage 86 · StrongModerate 68Details
Commit message · Salvatore Ingala

Fix ops computation for andor fragments

An incorrect result might allow registering policies that can't
later be spent.

As a reference, compare with: https://github.com/bitcoin/bitcoin/blob/3eca89820e1fb152ebf0315e3924fc374cb35958/src/script/miniscript.h#L1046-L1051

Tests generated with Claude Opus 5.5.

86/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Moderate 68/100

This commit fixes a bug in how the Ledger Bitcoin app counts the number of Bitcoin script operations (ops) needed to spend certain wallet policies that use a 'miniscript andor' fragment. Because the count was wrong, the app could allow users to register wallet policies that look valid but cannot actually be spent later because they exceed Bitcoin's 201-op limit. The fix changes one variable in a formula so the correct dissatisfaction branch is counted, matching Bitcoin Core's reference implementation. New tests confirm the fix.

AI review queuedFix ops computation for l: and u: fragmentsby Salvatore Ingala · b6ac1de8 · Oct 22, 2026 · 3 filesMessage 78 · AdequateHigh 74Details
Commit message · Salvatore Ingala

Fix ops computation for l: and u: fragments

The computation was undercounting the number of ops, which would
potentially allow certain policies that are actually unspendable.

Tests generated with Claude Opus 5.5.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · High 74/100

This commit fixes a bug in how the Ledger Bitcoin app counts Bitcoin script operations ('ops') for two specific Miniscript fragments, 'l:' and 'u:'. Because the count was too low, the app could accept wallet policies that look valid but are actually impossible to spend from under certain conditions. The fix makes the operation count more conservative so such unspendable policies are rejected. New tests are added to prevent the bug from returning.

Security candidatedoc: document the MUSIG2_SESSION_ID PSBT fieldby Salvatore Ingala · 8d8ed9af · Oct 21, 2026 · 2 filesMessage 68 · AdequateInformational 15Details
Commit message · Salvatore Ingala

doc: document the MUSIG2_SESSION_ID PSBT field

Describe the field (key, value, semantics), how psbt_session_id commits to
it, and mention the eviction of the oldest session when the storage is full.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarydocumentation-only discount
AI analysis · Informational 15/100

This commit only updates documentation and the changelog. It explains a new optional PSBT field called MUSIG2_SESSION_ID that lets software wallets manage multiple MuSig2 signing sessions for the same wallet policy on a Ledger device. There are no code changes in the diff, so it does not by itself fix or introduce a security vulnerability.

AI review queuedmusig_sessions: store up to 32 sessionsby Salvatore Ingala · a6798172 · Oct 21, 2026 · 4 filesMessage 78 · AdequateInformational 15Details
Commit message · Salvatore Ingala

musig_sessions: store up to 32 sessions

The previous limit of 8 is rather small, as a user might have multiple
accounts using MuSig2, each of them in a wallet that pre-generates
nonces.

Filling the whole storage makes the eviction test rather slow, so it
now only runs with --enable_slow_tests.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a simple capacity increase, not a security fix. It raises the number of simultaneous MuSig2 signing sessions the Ledger Bitcoin app can keep in memory from 8 to 32, because users with multiple MuSig accounts or wallets that pre-generate nonces could hit the old limit. The documentation and a test constant are updated to match, and the full-storage eviction test is made optional because filling 32 sessions is slow.

Security candidatesign_psbt: fail before the UI if the MuSig2 session is missingby Salvatore Ingala · 2d04b144 · Oct 21, 2026 · 7 filesMessage 73 · AdequateLow 26Details
Commit message · Salvatore Ingala

sign_psbt: fail before the UI if the MuSig2 session is missing

In MuSig2 round 2, the session was only looked up while signing, after the
user had already reviewed and approved the transaction; a missing session
then resulted in an error, and in a "Transaction rejected" screen.

With pubnonces generated in advance, a missing session is an expected case
(for example, it was evicted when the storage was full). The session id only
depends on the wallet policy and on the MUSIG2_SESSION_ID, so its existence
is now checked before the transaction is shown, without deleting it or
accessing its content if present.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 26/100

This commit improves the user experience and error handling for Ledger's Bitcoin app when using MuSig2 multi-signatures. Previously, if a required MuSig2 session was missing during the second round of signing, the device would only report the error after the user had already reviewed and approved the transaction on screen, causing a confusing 'Transaction rejected' message. Now, the app checks for the session before showing the transaction to the user, so it fails earlier and more clearly. There is no direct evidence this fixes a security vulnerability, but it reduces the chance of user confusion and wasted approvals.

Security candidatemusig_sessions: evict the oldest session when the storage is fullby Salvatore Ingala · 4c26f17d · Oct 21, 2026 · 3 filesMessage 78 · AdequateLow 30Details
Commit message · Salvatore Ingala

musig_sessions: evict the oldest session when the storage is full

Addresses the TODO by making sure that the oldest session is the evicted
one.

Each stored session now has a counter, larger than the counters of all
the other stored sessions; when there is no free slot, the session with
the smallest counter is evicted. To keep each session in a single 64-byte
NVRAM page, only the first 28 bytes of the psbt_session_id are stored.

The counter is enough for 2^32-1 sessions, so there is no practical risk
of overflow.

78/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
signing boundarymemory safetysigning or wallet path
AI analysis · Low 30/100

This commit changes how the Ledger Bitcoin app manages saved MuSig2 signing sessions in its limited persistent storage. Previously, when storage was full, the app would simply overwrite the first slot, which could discard a newer session instead of the oldest one. The fix adds an age counter so the oldest session is always evicted first. It also shrinks the stored session data to fit within a single memory page, storing only a 28-byte prefix of the session ID instead of the full 32 bytes. The commit itself treats this as a robustness improvement rather than a security fix, and there is no disclosed vulnerability or attacker benefit shown in the diff.

Security candidatesign_psbt: commit to the optional MUSIG2_SESSION_ID in psbt_session_idby Salvatore Ingala · ef7116ce · Oct 21, 2026 · 8 filesMessage 73 · AdequateLow 34Details
Commit message · Salvatore Ingala

sign_psbt: commit to the optional MUSIG2_SESSION_ID in psbt_session_id

This allows software wallets to manage several in flight MuSig2 rounds
for the same wallet policy by adding distinct MUSIG2_SESSION_IDs for
each of them; if used in Round 1, the same value must be used in
Round 2.

If the field is absent, psbt_session_id still only depends on the
wallet policy.

A present but empty or too long value is rejected with
EC_SIGN_PSBT_INVALID_MUSIG2_SESSION_ID. Accepted values are at least
1 and at most 32 bytes long.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 34/100

This commit adds an optional 'session ID' field to MuSig2 multi-signature signing sessions in Ledger's Bitcoin app. Previously, the device could only track one unfinished signing session per wallet policy; starting a second one would overwrite the first. The change lets wallet software label each session with a unique ID so multiple signing rounds can run in parallel. It also rejects malformed IDs (empty or too long). This is a feature enhancement that reduces the chance of a wallet accidentally mixing up or losing in-flight signing sessions.

Security candidatepython client: first-class MUSIG2_SESSION_ID fieldby Salvatore Ingala · f7d93d18 · Oct 20, 2026 · 2 filesMessage 73 · AdequateInformational 18Details
Commit message · Salvatore Ingala

python client: first-class MUSIG2_SESSION_ID field

Add PSBT.musig2_session_id, for the proprietary global field with
identifier "MUSIG2_SESSION_ID", subtype 0 and no keydata. It will
be used in the next commits to allow a software wallet to handle
parallel MuSig2 signing sessions for the same wallet policy.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 18/100

This commit adds support in Ledger's Python PSBT library for a new optional metadata field called MUSIG2_SESSION_ID. It is a preparatory client-side change for upcoming MuSig2 multi-signature features. The commit does not change any device firmware, cryptographic operations, or security-critical logic; it only lets the Python client recognize, parse, and serialize this new PSBT field correctly.

AI review queuedMerge pull request #574 from LedgerHQ/harden-bip340by Salvatore Ingala · 92d330c2 · Oct 19, 2026 · 1 fileMessage 58 · ThinModerate 59Details
Commit message · Salvatore Ingala

Merge pull request #574 from LedgerHQ/harden-bip340

Improve BIP-340 conformance

58/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
Why it was queued
defensive validationsigning or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Moderate 59/100

This commit hardens how the Ledger Bitcoin app creates Schnorr (BIP-340) signatures when signing Bitcoin transactions. It now injects its own auxiliary randomness and asks the device's crypto library to use it, then verifies every signature before releasing it. These changes reduce the risk that a broken random number generator or a computation fault could produce a weak or invalid signature that might leak the private key or be rejected by the network.

AI review queuedMerge pull request #573 from LedgerHQ/misc-fixesby Salvatore Ingala · 017aee47 · Oct 14, 2026 · 7 filesMessage 53 · ThinModerate 59Details
Commit message · Salvatore Ingala

Merge pull request #573 from LedgerHQ/misc-fixes

Miscellaneous fixes

53/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Moderate 59/100

This commit fixes three separate safety checks in Ledger's Bitcoin app. First, it prevents the app from building a response larger than the APDU buffer, which could previously overwrite the status word. Second, it refuses to register wallet policies containing multisig setups inside old-style P2SH scripts with more than 15 public keys, because Bitcoin consensus rejects scripts larger than 520 bytes. Third, it now rejects wallet policies at registration time that the device would later be unable to sign for, specifically policies where a single MuSig2 group contains more than one internal key, or where more than 8 key expressions involve internal keys. These are hardening fixes rather than a single critical vulnerability.