opentele-ng accepts attacker-influenced binary blobs (tdata files from
the filesystem and Telegram-server responses through Telethon). Any class
of bug that lets a crafted input do one of the following is in scope:
- Remote code execution in the importer / parser
- Unbounded memory / CPU (
OOM, DoS) on malformed payloads - Path traversal in
tdatawrite code - Authentication-bypass through tampered
auth_key/salt - Information disclosure of secrets from process memory or logs
| Version | Status |
|---|---|
| 1.0.3 and later | Active — security fixes go here |
| 1.0.x earlier | EOL — please upgrade; 1.0.3 closed all known DoS vectors |
| 0.x | EOL — major dependency surface change in 1.0.0 |
Do not open a public GitHub issue for a security report.
Email the maintainer privately at the address in
pyproject.toml (project.authors[0].email), or open a
GitHub Security Advisory
for this repo.
What to include:
- A clear description of the vulnerability and the affected version
(
pip show opentele-ngoutput works). - A minimal reproducer: a Python snippet plus a hex-encoded byte string
for the malformed payload, or a small
tdata-shaped folder. - The impact you observed (process hang, OOM kill, traceback, etc.).
- Optional: a suggested fix or patch.
- Acknowledgement within 3 business days.
- Triage within 14 days. Severity is assigned using a simple judgement of impact × exploit difficulty — there is no formal CVSS scoring.
- Coordinated disclosure for confirmed vulnerabilities: a fix lands
in the next patch release (e.g.
1.0.x → 1.0.x+1), the CHANGELOG describes the vulnerability after the release is out, and credit is given by name (or anonymously, your choice).
- Secure-by-default tdata write (1.3.0):
TDesktop.kPerformanceModedefaulted toTruein 1.2.x and earlier (upstream behaviour). In that modeSaveTDataskipped reallocalKeyderivation and embedded a hard-coded key fromtdesktop.py. The resultingtdatawas readable by anyone with the bytes — effectively unencrypted. Since 1.3.0 the default isFalse; opt-in viaTDesktop.PerformanceMode(True)emits aUserWarningthat reminds the caller it's only safe for throwaway data. - Strict-by-default unknown
lskType(1.3.0):MapData.readnow raisesTDataReadMapDataFailedon unrecognised keys instead of silently continuing past their payload (which would desync the read cursor and could silently drop data on subsequent keys). SetOPENTELE_LENIENT_UNKNOWN_LSK=1to log-and-break if you need to load partial maps written by a future Telegram Desktop. - DoS guards (1.0.3) on every attacker-controlled
countloop inMapData.read(lskDraft / lskDraftPosition / lskLegacyImages / lskBotStorages),Account._setMtpAuthorization.readKeys, andTDesktop.__loadFromTDataaccounts list. Pre-loop cap bybytesAvailable() // pair_size. Seetests/test_dos_protection.py. - OOM protection (1.0.2) on
QByteArray/QStringdeserialization: a declared length of0xFFFFFFFE(~4 GB) on a short payload setsStatus.ReadPastEndinstead of pre-allocating. Seetests/qdatastream/test_pure_errors.py. - AES alignment (1.0.1) on the encrypted descriptor empty-payload
path: writes the minimal valid upstream-readable
dataLen=4size marker and pads to a 16-byte AES block, instead of trying to encrypt a 0-byte payload (which would fail withtgcrypto's "data must be multiple of 16 bytes"). - Status sticky in
opentele.td.qdatastream.QDataStream:ReadPastEnd/ReadCorruptDatapersist across reads untilresetStatus()— matches PyQt6 semantics, prevents masking of earlier corruption by a subsequent successful read. @extend_classstrict by default (3.0+): attribute conflicts raiseTypeErrorinstead of silently dropping the attribute. SetOPENTELE_EXTEND_STRICT=0to fall back to the warning-only behaviour for upstream compatibility, but this widens the attack surface for malicious extensions and is not recommended for production.
- Vulnerabilities in
telethon,tgcrypto-pyrofork, or other third-party dependencies — please report those upstream. - Issues that require an attacker to already have write access to your tdata folder (the entire model assumes that folder is a trust boundary).
- Bugs in unofficial Telegram clients whose tdata format
opentele-ngcannot guarantee to read correctly. Submit a separate compatibility issue.