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

util.make_aiohttp_session: wrap aiohttp-socks 0.11+ excs to ClientError

Public commit record

What the developer wrote

Authored by SomberNight

81/100 · Strong
util.make_aiohttp_session: wrap aiohttp-socks 0.11+ excs to ClientError

older versions of aiohttp-socks and python-socks used to raise
- ProxyConnectionError(OSError)
- ProxyTimeoutError(TimeoutError)
- ProxyError(Exception)

now they raise:
- ProxyConnectionError(Exception)
- ProxyTimeoutError(Exception)
- ProxyError(Exception)

In many call sites, we currently handle OSError and TimeoutError,
usually by simply logging the error or showing it to the user.
Another exceptions our call sites handle similarly is aiohttp.ClientError,
which is the aiohttp base class for any client connection error.

A simple "fix" for us to restore the old behaviour is converting the new aiohttp_socks
exception types to aiohttp.ClientError.

ref https://github.com/romis2012/aiohttp-socks/commit/db4235c2b9805f088e47074647c946873a231487
ref https://github.com/romis2012/python-socks/commit/50a3024a8ac10888085f963e44ab3a79d6574703
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a compatibility issue with newer versions of a proxy library used by Electrum. The newer library changed which error types it raises when proxy connections fail. Because Electrum's code was written to catch the old error types, unexpected proxy errors could slip through, potentially causing crashes or confusing error messages instead of being handled gracefully. The fix converts the new proxy errors into a standard network error type that Electrum already knows how to handle.

Recommended action

Treat as a robustness/compatibility fix rather than an active vulnerability. Users relying on SOCKS/Tor proxies should upgrade to ensure proxy failures are handled gracefully. Review other call sites that catch OSError/TimeoutError to confirm no similar mismatches remain.

Security signals we found

01

Exception-handling mismatch after dependency update

02

Proxy connection errors could propagate uncaught

03

Potential denial-of-service via unhandled exception causing task/coroutine termination

04

No input validation or memory safety issue

Risk score

Why this scored 37/100

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