IntelligenceFindingsNMN-2026-0087
Unsound API in `secp256k1` allows use-after-free and invalid deallocation from safe code
CandidateMachine- or researcher-generated; not independently verified.
In short
What to know.
- Package
- secp256k1 crates.iosecp256k1: from 0.24.0 before 0.24.2
- What to do
- Upgrade secp256k1 to 0.22.2 or 0.23.5 or 0.24.2 or later.
- Severity
- UnknownRated 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.
- Candidate
- In review
- Reproduced
- Confirmed
- Resolved
- Disputed
- Withdrawn
7 listed
Sources
- OSV record RUSTSEC-2022-0070osv.devRetrieved 3 December 2026
- package reference for RUSTSEC-2022-0070crates.ioRetrieved 3 December 2026
- advisory reference for RUSTSEC-2022-0070rustsec.orgRetrieved 3 December 2026
- report reference for RUSTSEC-2022-0070github.comRetrieved 3 December 2026
- web reference for RUSTSEC-2022-0070github.comRetrieved 3 December 2026
- OSV record GHSA-969w-q74q-9j8vosv.devRetrieved 3 December 2026
- package reference for GHSA-969w-q74q-9j8vgithub.comRetrieved 3 December 2026
Full record
- Finding
- NMN-2026-0087
- Category
- vulnerability
- Component
- secp256k1 (crates.io)secp256k1: from 0.24.0 before 0.24.2
- Severity
- Unknown. Rated by the source advisory.The source advisory RUSTSEC-2022-0070 gives no severity label. 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 secp256k1 to 0.22.2 or 0.23.5 or 0.24.2 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.
- Related advisories
- GHSA-969w-q74q-9j8vRUSTSEC-2022-0070
- 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:49 UTCUpdated 3 December 2026, 16:49 UTC
Summary, as published by the source advisory
2 events, oldest first
History
History verified: 2 eventsLatest hashc3cdca55a220c3cdca55a220c34b99003b194d5b54e8db8c3821b7c3a1c7fc1719ad9cccc944
Record createdMachine-generated
By advisory-monitor@1.0.0 (agent, machine-generated)
Reason: Imported from public advisory GHSA-969w-q74q-9j8v.
Entered the record in the state Candidate.
Event 1 hash143ad1480b1b143ad1480b1b4ef713ac744a44f3013ccb6e39d316551f65e4c4c4d76fb96759CorrectionMachine-generated
By advisory-monitor@1.0.0 (agent, machine-generated)
Reason: The source advisory RUSTSEC-2022-0070 changed.
Event 2 hashSources
Before
[ { "url": "https://osv.dev/vulnerability/GHSA-969w-q74q-9j8v", "title": "OSV record GHSA-969w-q74q-9j8v", "retrieved": "2026-12-03" }, { "url": "https://github.com/rust-bitcoin/rust-secp256k1/issues/543", "title": "web reference for GHSA-969w-q74q-9j8v", "retrieved": "2026-12-03" }, { "url": "https://github.com/rust-bitcoin/rust-secp256k1", "title": "package reference for GHSA-969w-q74q-9j8v", "retrieved": "2026-12-03" }, { "url": "https://rustsec.org/advisories/RUSTSEC-2022-0070.html", "title": "web reference for GHSA-969w-q74q-9j8v", "retrieved": "2026-12-03" } ]
After
[ { "url": "https://osv.dev/vulnerability/RUSTSEC-2022-0070", "title": "OSV record RUSTSEC-2022-0070", "retrieved": "2026-12-03" }, { "url": "https://crates.io/crates/secp256k1", "title": "package reference for RUSTSEC-2022-0070", "retrieved": "2026-12-03" }, { "url": "https://rustsec.org/advisories/RUSTSEC-2022-0070.html", "title": "advisory reference for RUSTSEC-2022-0070", "retrieved": "2026-12-03" }, { "url": "https://github.com/rust-bitcoin/rust-secp256k1/issues/543", "title": "report reference for RUSTSEC-2022-0070", "retrieved": "2026-12-03" }, { "url": "https://github.com/rust-bitcoin/rust-secp256k1/pull/548", "title": "web reference for RUSTSEC-2022-0070", "retrieved": "2026-12-03" }, { "url": "https://osv.dev/vulnerability/GHSA-969w-q74q-9j8v", "title": "OSV record GHSA-969w-q74q-9j8v", "retrieved": "2026-12-03" }, { "url": "ht... (135 more characters)
Summary
Before
Because of incorrect bounds on method `Secp256k1::preallocated_gen_new` it was possible to cause use-after-free from safe consumer code. It was also possible to "free" memory not allocated by the appropriate allocator. The method takes a place for storing the context as a mutable reference and returns context containing that reference. Because the code internally uses `unsafe` and the bounds were incorrect it was possible to create a context that outlived the passed reference (e.g. `'static`). Because the context can alternatively carry heap-allocated pointer freed on drop it was possible to "deallocate" a pointer that wasn't returned from appropriate allocator. The code decides whether to free the memory based on type parameter but because of missing bound it was possible to construct the context with invalid parameter. You are unaffected if you either * don't call `Secp256k1::preall... (722 more characters)
After
Because of incorrect bounds on method `Secp256k1::preallocated_gen_new` it was possible to cause use-after-free from safe consumer code. It was also possible to "free" memory not allocated by the appropriate allocator. The method takes a place for storing the context as a mutable reference and returns context containing that reference. Because the code internally uses `unsafe` and the bounds were incorrect it was possible to create a context that outlived the passed reference (e.g. `'static`). Because the context can alternatively carry heap-allocated pointer freed on drop it was possible to "deallocate" a pointer that wasn't returned from appropriate allocator. The code decides whether to free the memory based on type parameter but because of missing bound it was possible to construct the context with invalid parameter. You are unaffected if you either * don't call `Secp256k1::preall... (722 more characters)
Affected versions
Before
[ { "name": "secp256k1", "ranges": [ { "fixed": "0.22.2", "introduced": "0.14.0" } ], "ecosystem": "crates.io" }, { "name": "secp256k1", "ranges": [ { "fixed": "0.23.5", "introduced": "0.23.0" } ], "ecosystem": "crates.io" }, { "name": "secp256k1", "ranges": [ { "fixed": "0.24.2", "introduced": "0.24.0" } ], "ecosystem": "crates.io" } ]
After
[ { "name": "secp256k1", "ranges": [ { "fixed": "0.24.2", "introduced": "0.24.0" } ], "ecosystem": "crates.io" } ]
Severity
Before
moderate
After
unknown
Mitigation
Before
Upgrade secp256k1 to 0.22.2 or later. Upgrade secp256k1 to 0.23.5 or later. Upgrade secp256k1 to 0.24.2 or later.
After
Upgrade secp256k1 to 0.22.2 or 0.23.5 or 0.24.2 or later.
severityRationale
Before
Severity as labelled by the source advisory GHSA-969w-q74q-9j8v. Noumen has not assessed it.
After
The source advisory RUSTSEC-2022-0070 gives no severity label. Noumen has not assessed it.
c3cdca55a220c3cdca55a220c34b99003b194d5b54e8db8c3821b7c3a1c7fc1719ad9cccc944
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.