AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 38 Bitcoin

currencyrate: fix cached currencies to still use median.

Public commit record

What the developer wrote

Authored by Rusty Russell

65/100 · Adequate
currencyrate: fix cached currencies to still use median.

It was using *only* the latest one, not all the fresh ones.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit fixes a bug in Core Lightning's currency-rate plugin. Previously, when exchange-rate data was cached, the plugin used only the most recent single source instead of combining all still-fresh sources and taking the median. Using a single source makes the converted bitcoin amount easier to manipulate if one price feed is wrong or malicious. The fix restores the intended median behavior across all fresh cached prices.

Recommended action

Review how the median is computed and ensure outlier rejection is robust; confirm that SERVE_TTL and background refresh intervals prevent use of stale data; consider adding tests for single-source and multi-source cache scenarios including adversarial price feeds.

Security signals we found

01

Single-source dependency instead of multi-source median

02

Potential price oracle manipulation via stale or compromised feed

03

Test re-enabled after xfail indicates prior known incorrect behavior

Risk score

Why this scored 38/100

Our methodology →
Potential impact 8/30
Exploitability 6/25
Stealth signal 7/15
Affected reach 6/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.