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

urldecode: add validation for URL encoding

Public commit record

What the developer wrote

Authored by Mike Tolkachev

45/100 · Thin
urldecode: add validation for URL encoding
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit hardens a URL-decoding helper in Blockstream Jade's firmware. It adds validation so malformed percent-encoding, embedded null bytes, control characters, and non-ASCII bytes are rejected instead of being silently decoded. A new 'dry run' validation function is also exposed so callers can check an encoded string before decoding it. The change is defensive: it reduces the chance that an attacker could smuggle dangerous characters into URLs or trick downstream code with truncated or malformed strings.

Recommended action

Review all callers of urldecode() and is_valid_urlencoding() to ensure they handle the new false-return cases safely (e.g. do not fall back to using unvalidated input). Confirm that the printable-ASCII restriction (0x20-0x7e) does not break legitimate URL parameters such as internationalized domain names or non-English labels. Consider adding unit tests for malformed % sequences, embedded NULs, and buffer-overflow scenarios.

Security signals we found

01

Input validation added for percent-encoded sequences

02

Rejection of embedded NUL bytes and control characters in decoded output

03

Rejection of non-ASCII decoded bytes (>=0x80 and DEL 0x7f)

04

Removal of silent output-buffer truncation

05

New dry-run validation API is_valid_urlencoding()

06

Callback hook for caller-specific character filtering

Risk score

Why this scored 45/100

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