Skip to main content
EPSS 0.1%top 98%

Gptline: NLTK: Missing Post-Download Integrity Verification Allows Malicious Package Injection (CVE-2026-63310)

0
Medium
Published: 09/02/2026 (09/02/2026, 09:04:32 UTC)
Source: GCVE Database
Product: gptline

Description

NLTK's package downloader in nltk/downloader.py does not verify file integrity after download and before extraction. The download flow at lines 789-825: 1. File is downloaded to a temp path via HTTP 2. os.replace(tmp_filepath, filepath) moves it to the final location (line 799) 3. Extraction begins via _unzip_iter() (line 825) Between steps 2 and 3, there is no SHA-256 verification. The checksum logic exists in _pkg_status() (lines 982-1015) but it is only used BEFORE download as a status check ("is this package already installed and up-to-date?"). It is never called after download to verify the file that was actually received. Attack vectors: 1. MITM during HTTP download (NLTK downloads from http:// by default on some mirrors) 2. Race condition on shared filesystems (attacker replaces file between os.replace and _unzip_iter) 3. DNS poisoning redirecting to attacker-controlled server PoC: ```python import nltk import unittest.mock import zipfile import io import os # Create a malicious zip that will be "downloaded" malicious_zip = io.BytesIO() with zipfile.ZipFile(malicious_zip, 'w') as zf: zf.writestr('punkt_tab/tokenizers/punkt_tab/english.pickle', b'MALICIOUS PAYLOAD - attacker controlled content') # Patch urllib to return our malicious zip with unittest.mock.patch('urllib.request.urlopen') as mock_urlopen: mock_response = unittest.mock.MagicMock() mock_response.read.return_value = malicious_zip.getvalue() mock_response.headers = {'Content-Length': str(len(malicious_zip.getvalue()))} mock_urlopen.return_value = mock_response # Download proceeds, no integrity check catches the swap # nltk.download('punkt_tab') # Would install attacker payload ``` This is distinct from CVE-2024-39705 (pickle deserialization via download) and CVE-2025-14009 (zip-slip path traversal). Those address what happens AFTER extraction. This finding addresses the gap BEFORE extraction where integrity is never verified. Suggested fix: After os.replace() and before _unzip_iter(), compute SHA-256 of the final file and compare against the expected checksum from the package index. Reject and delete the file if the hash does not match.

CVSS v3.1

Score 5.3medium

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N

Affected software

nltk
pkg:pypi/nltk
Affected versions
<3.9.3
Homebrewmore threats →ghsa
gptline
pkg:brew/gptline
Affected versions
>=1.0.8 <1.0.8_14

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/15/2026, 02:12:50 UTC

Technical Analysis

This vulnerability, tracked as CVE-2026-63310, is associated with CWE-494, which typically relates to Download of Code Without Integrity Check. It affects all versions before 3.9.3. No further technical details or exploitation methods are provided in the available data.

Potential Impact

The impact is assessed as medium severity based on the provided classification. Without detailed information, the exact consequences cannot be determined. No known active exploitation has been reported.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no patch links or vendor advisories are provided, users should monitor official sources for updates and apply any future fixes promptly.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-gf32-cmjh-8m9v
Osv Schema Version
1.4.0
Aliases
["CVE-2026-63310"]
Database Specific Severity
CRITICAL
Cvss Version
3.1

Threat ID: 6a8a27f7acd9273b499bc992

Added to database: 08/22/2026, 22:51:35 UTC

Last enriched: 09/15/2026, 02:12:50 UTC

Last updated: 10/03/2026, 12:30:42 UTC

Views: 181

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses