Skip to content
NOUMENResearch
Network
Engineering
, home page

IntelligenceFindingsNMN-2026-0003

tiny-secp256k1 vulnerable to private key extraction when signing a malicious JSON-stringifyable message in bundled environment

CandidateMachine- or researcher-generated; not independently verified.

In short

What to know.

Package
tiny-secp256k1 npmtiny-secp256k1: before 1.1.7
What to do
Upgrade tiny-secp256k1 to 1.1.7 or later.
Severity
HighRated by the source advisory.
Confidence
HighThe affected range comes from the advisory; no system that uses the component has been assessed.

Verification

Where it stands.

  1. Candidate
  2. In review
  3. Reproduced
  4. Confirmed
  5. Resolved
  6. Disputed
  7. Withdrawn
Candidate Machine- or researcher-generated; not independently verified.

What each state means, and how a record moves between them.

5 listed

Sources

  1. OSV record GHSA-7mc2-6phr-23xcosv.devRetrieved 3 December 2026
  2. web reference for GHSA-7mc2-6phr-23xcgithub.comRetrieved 3 December 2026
  3. advisory reference for GHSA-7mc2-6phr-23xcnvd.nist.govRetrieved 3 December 2026
  4. web reference for GHSA-7mc2-6phr-23xcgithub.comRetrieved 3 December 2026
  5. package reference for GHSA-7mc2-6phr-23xcgithub.comRetrieved 3 December 2026

Full record

Finding
NMN-2026-0003
Category
vulnerability
Component
tiny-secp256k1 (npm)tiny-secp256k1: before 1.1.7
Severity
High. Rated by the source advisory.Severity as labelled by the source advisory GHSA-7mc2-6phr-23xc. CVSS as given: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:P. Noumen has not assessed it.
Confidence
High.The affected range comes from the advisory; no system that uses the component has been assessed.
State
Candidate. Machine- or researcher-generated; not independently verified.
Disclosure
Public
Mitigation
Upgrade tiny-secp256k1 to 1.1.7 or later.
Discovery method
imported from a public advisory by the Advisory Monitor (1.0.0)Machine-generated by the agent advisory-monitor@1.0.0.
Reproduction
No reproduction steps recorded.
Affected systems
None listed. A link to a system needs its own evidence.
Attribution
Researcher: advisory-monitor@1.0.0 (agent, machine-generated)Validators: None yet
Assigned reviewer
Nobody yet
Dates
Created 3 December 2026, 16:47 UTCUpdated 3 December 2026, 16:47 UTC
Summary, as published by the source advisory
As published by the source advisory
### Summary Private key can be extracted on signing a malicious JSON-stringifiable object, when global Buffer is [`buffer` package](https://www.npmjs.com/package/buffer) ### Details This affects only environments where `require('buffer')` is <https://npmjs.com/buffer> E.g.: browser bundles, React Native apps, etc. `Buffer.isBuffer` check can be bypassed, resulting in `k` reuse for different messages, leading to private key extraction over a single invalid message (and a second one for which any message/signature could be taken, e.g. previously known valid one) v2.x is unaffected as it verifies input to be an actual `Uint8Array` instance Such a message can be constructed for any already known message/signature pair, meaning that the attack needs only a single malicious message being signed for a full key extraction While signing unverified attacker-controlled messages would be problematic itself (and exploitation of this needs such a scenario), signing a single message still should not leak the private key Also, message validation could have the same bug (out of scope for this report, but could be possible in some situations), which makes this attack more likely when used in a chain https://github.com/bitcoinjs/tiny-secp256k1/pull/140 is a subtle fix for this ### PoC This code deliberately doesn't provide `funnyBuffer` and `extractTiny` for now, could be updated later ```js import secp256k1 from 'tiny-secp256k1' import crypto from 'crypto' const key = crypto.randomBytes(32) const msg0 = crypto.randomBytes(32) const sig0 = secp256k1.sign(msg0, key).toString('hex') const msg1 = funnyBuffer(msg0) const sig1 = secp256k1.sign(msg1, key).toString('hex') const restored = extractTiny(msg0, sig0, sig1) console.log('Guesses:', JSON.stringify(restored, undefined, 2)) const recheck = (k) => secp256k1.sign(msg0, Buffer.from(k, 'hex')).toString('hex') === sig0 console.log('Rechecked:', JSON.stringify(restored.filter(recheck))) console.log('Actual key', key.toString('hex')) ``` Output: ```console Guesses: [ "8f351953047e6b149e0595547e7d10a8a1edc61bd519b5b2514202a495e434ed", "ebc81e1632a1b3255589ba84364949a0a6fd0229444519765570706d394671dd" ] Rechecked: ["ebc81e1632a1b3255589ba84364949a0a6fd0229444519765570706d394671dd"] Actual key ebc81e1632a1b3255589ba84364949a0a6fd0229444519765570706d394671dd ``` ### Impact Full private key extraction when signing a single malicious message (that passes `JSON.stringify`/`JSON.parse` and can come from network)

1 event, oldest first

History

History verified: 1 eventLatest hash84464f2f305d84464f2f305d5b41150e6d14462b859ddc479580248dd71261e0b22d79d605ee

  1. Record createdMachine-generated

    By advisory-monitor@1.0.0 (agent, machine-generated)

    Reason: Imported from public advisory GHSA-7mc2-6phr-23xc.

    Entered the record in the state Candidate.

    Event 1 hash84464f2f305d84464f2f305d5b41150e6d14462b859ddc479580248dd71261e0b22d79d605ee
About this record

Severity and confidence are rated separately, each with its own reason.

History events are never edited or deleted. Each stores the hash of the one before, so a later change breaks the chain.

Corrections keep the value before and after.