Skip to content
Leaked secrets Audit finding Beginner

Using the test keyring backend is insecure

The code uses a test keyring backend that stores private keys in plaintext, which is insecure for production. An attacker with access to the stored keys could read them and potentially compromise the associated accounts.

KlosMitSoss Follow

Originally disclosed on Immunefi

Informational View original
  • Disclosed after under an hour

#41985 [BC-Insight] Using the test keyring backend is insecure

Submitted on Mar 19th 2025 at 19:34:52 UTC by @KlosMitSoss for Attackathon | Movement Labs

Description

Brief/Intro

The "test" keyring backend stores keys in plaintext which means that it is insecure.

Vulnerability Details

Using a "test" keyring backend is not safe for production as it stores keys in plaintext. When handling real private keys, it is recommended to use a more secure keyring backend like "file" or "os".

Hence, a different keyring backend should be used for these two instances:

https://github.com/immunefi-team/attackathon-movement/blob/a2790c6ac17b7cf02a69aea172c2b38d2be8ce00/protocol-units/da/movement/protocol/celestia-runners/src/celestia\\_light/mainnet.rs#L21

https://github.com/immunefi-team/attackathon-movement/blob/a2790c6ac17b7cf02a69aea172c2b38d2be8ce00/protocol-units/da/movement/protocol/setup/src/common/celestia.rs#L77

Impact Details

The "test" keyring backend stores keys in plaintext which is not secure.

References

References are provided throughout the report.

Proof of Concept

Proof of Concept

According to the Celestia docs, there are multiple keyring backends that could be used instead: https://docs.celestia.org/how-to-guides/celestia-app-vesting#optional-change-your-client-toml

The original report as published on Immunefi, by KlosMitSoss. Images and videos are our own copies; raw HTML is shown as text. View it on Immunefi.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the code was configured to use the test keyring backend instead of a secure one for production use.

Impact

The plaintext storage of keys could allow an attacker who gains access to the files to read private keys, though the report does not describe a specific attack path.

What the attacker needed

Access to stored key files

The fix

The code should use a more secure keyring backend such as 'file' or 'os' instead of 'test'.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A keyring backend is the part of a program that stores secret keys. The 'test' backend saves them without encryption, so anyone who can read the files can see the keys. This report says that backend should not be used when real keys are involved.

What is Leaked secrets?

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.

More by KlosMitSoss

View all

25 more disclosed reports, best first.

More from Movement Labs

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Leaked secrets and credentials

The lesson behind this report.

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.