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

json_db: escape '\' and '~' in json patch pointer

Public commit record

What the developer wrote

Authored by f321x

88/100 · Strong
json_db: escape '\' and '~' in json patch pointer

> Because the characters '~' (%x7E) and '/' (%x2F) have special
meanings in JSON Pointer, '~' needs to be encoded as '~0' and '/'
needs to be encoded as '~1' when these characters appear in a
reference token.

https://www.rfc-editor.org/info/rfc6901/
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a bug in how Electrum builds JSON Patch pointers when wallet data contains special characters like '/' or '~' in keys. Before the fix, these characters were not escaped, which could cause patch operations to target the wrong location in the wallet database or fail. The fix follows RFC 6901 by escaping '~' as '~0' and '/' as '~1'. This is a data-integrity bug in wallet storage synchronization, but the commit itself does not describe it as a security vulnerability.

Recommended action

Treat as a bug fix with possible data-integrity/security implications. Review whether unescaped patches could have caused wallet state corruption or unexpected behavior in prior versions, especially for wallets with labels or custom keys containing '/' or '~'. No immediate exploit mitigation is described, but users relying on such keys should update.

Security signals we found

01

Incorrect JSON Pointer escaping can misroute patch operations

02

Potential data corruption or loss in wallet database updates

03

No explicit security framing in commit message or diff

04

Fixes a standards-compliance bug (RFC 6901)

Risk score

Why this scored 59/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 8/15
Affected reach 10/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.