Skip to content

GHSA-8ch4-58qp-g3mp CVE-2021-33880 PYSEC-2021-95

Observable Timing Discrepancy in aaugustin websockets library

Medium PyPI
Severity
0.0 / 10
Medium · CVSS 4.0
Exploit chance (EPSS)
2.27%
Chance of exploitation in the next 30 days. Higher than 83.01% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-203 Observable Discrepancy
CWE-208 Observable Timing Discrepancy
Fix
9.1
Upgrade websockets to this version or later

Description

The aaugustin websockets library before 9.1 for Python has an Observable Timing Discrepancy on servers when HTTP Basic Authentication is enabled with basic_auth_protocol_factory(credentials=...). An attacker may be able to guess a password via a timing attack.

Affected versions

PyPI

PackageVulnerableFixed in
websockets
< 9.1
9.1
websockets
< 9.1
9.1

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

websockets PyPI → 9.1

pip
pip install --upgrade "websockets>=9.1"
poetry
poetry add "websockets>=9.1"
uv
uv add "websockets>=9.1"

Severity breakdown

CVSS 4.0 0.0

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Attack vector
Network
Attack complexity
Low
Attack requirements
Present
Privileges required
None
User interaction
None
Confidentiality (vulnerable system)
High
Integrity (vulnerable system)
None
Availability (vulnerable system)
None
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
None
Availability (subsequent systems)
None

CVSS 3.1 5.9

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Weakness

CWE-203: Observable Discrepancy

The product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor.

How to prevent it
  • Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
  • Implementation: Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success. If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files. Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.

CWE-208: Observable Timing Discrepancy

Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-6g87-ff9q-v847
websockets is vulnerable to denial of service by memory exhaustion
High Also affects websockets
EEF-CVE-2026-65626
Bleichenbacher padding oracle in RSAES-PKCS1-v1_5 decryption in jose
Not rated yet Same weakness, CWE-203
GHSA-vwp5-f99x-x3rq
Backstage has improper input validation in scaffolder task list ordering
Medium Same weakness, CWE-203
GHSA-v6q3-xqxm-6f5v
Ghost: Invite Token Disclosure in Ghost Admin API
High Same weakness, CWE-203
GHSA-53vv-xm9f-mm82
Ghost: Password Hash Ordering Disclosure in Ghost Admin API
Low Same weakness, CWE-203
GHSA-2p9g-x3cv-5hh4
Private Weblate projects vulnerable to observable object existence disclosure via globally scoped object lookups
Medium Same weakness, CWE-203
GHSA-8fxq-53rx-ph5f
Coder: Login endpoint user enumeration via timing-defense placeholder in password comparison
Medium Same weakness, CWE-203
GHSA-4pjg-x8qj-33j5
SiYuan: authFilePublishAccess distinguishes hidden and forbidden documents from public and nonexistent ones, and issues a publish-auth cookie for documents it reports as forbidden
Medium Same weakness, CWE-203
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor