Sample chat files are downloaded over cleartext HTTP in whatstk
Description
Cleartext Transmission of Sensitive Information (CWE-319) in whatstk/data.py, in whatstk from 0.3.0 before 0.9.0. An attacker on the network path between the user and raw.githubusercontent.com can substitute the sample chat files the library downloads.
The module builds chats_folder on the http scheme, and every entry of whatsapp_urls, which is the documented way to load a sample chat, inherits that prefix.
_str_from_file() (whatstk/whatsapp/parser.py) passes any path beginning with http to urlopen(), which follows GitHub's 301 redirect to HTTPS. The first request has already travelled in cleartext on port 80 by then, so an attacker who answers before the redirect supplies the file that gets parsed, and the redirect is never reached.
The scheme is not confined to the two places the report named. It appears 15 times across 7 files of the affected releases: the sample URLs themselves, a docstring in whatstk/analysis/interventions.py that renders in the API reference, the test suite, and four documentation pages. The library does not fetch the documentation links, but they are the ones readers copy. The project URL published to PyPI uses http as well.
The files served are public sample chats. What the attacker gains is control of the content the library parses, not sight of anything confidential.
Vulnerability type (CWE)
- CWE-319: Cleartext Transmission of Sensitive Information
Affected versions
whatstk from 0.3.0 before 0.9.0. Default status: unaffected.
whatstk/data.py arrives in 0.3.0 and releases before that carry no sample chat URLs at all. Checked by reading the scheme in that file at every one of the project's 26 release tags: http from v0.3.0 through v0.8.1, https from v0.9.0 onward, with no release in between going either way.
Counted across the whole tree rather than in the two files reported: 15 occurrences of the cleartext host in 7 files at v0.8.1, and none at v0.9.0. The http project URL in pyproject.toml is gone at v0.9.0 as well.
Score (CVSS 4.0)
Low (2.1)
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
The attack vector is Network because the substitution happens in transit. The attack complexity is Low, since there is nothing cryptographic to defeat: the request is plaintext. The attack requirements are Present because the attacker has to hold a position on the path between the user and the host, which is a condition outside their control. The privileges required are None, as no access to the user's machine is needed. The user interaction is Active because the user has to run code that fetches a sample chat. Confidentiality on the vulnerable system is None: the files are public sample chats and nothing of the user's is disclosed. Integrity on the vulnerable system is Low because the parsed result is whatever the attacker returns, bounded to the content of a file the user asked for. Availability is None. The subsequent system metrics are None, since no impact beyond the parsed result is demonstrated.
Solution
Upgrade to whatstk 0.9.0 or later, where every sample chat URL uses the https scheme.
On an affected release, passing an https URL of the same file to the loader, instead of the whatsapp_urls entry, avoids the cleartext request, because the loader accepts any URL.
Patch
Released in 0.9.0, through pull request #184 and the release commit 01d66d8.
Every occurrence of the cleartext host is changed to https, in the sample URLs, the docstring, the tests and the documentation pages, and the http project URL is removed from pyproject.toml. A test in tests/test_data.py asserts that each entry of whatsapp_urls starts with https://, so the scheme cannot regress silently.
The loader is not changed to refuse http URLs, which the report raised as an optional third step. That would stop a caller loading a chat over HTTP from their own server or an internal network.
Credits
- m.gongora.carriedo - finder
- Xoán M. Otero Jorge - analyst
- Darío Rivas - analyst
- Secur0 CNA - coordinator
- Lucas Rodés-Guirao - remediation developer Discovery source: External
Official record: CVE-2026-142382
Related records
- CVE-2026-141426 - Google Drive client secret written readable by other local users in the same library
- CVE-2026-121691 - unbounded ZIP extraction in the same library
- CVE-2026-121577 - unescaped header separators building a regular expression that backtracks exponentially in the same library
- CVE-2026-121564 - silent message loss when merging overlapping exports in the same library