CVE-2026-0846: Arbitrary File Read via Absolute Path Input in nltk.util.filestring()

Published Mar 9, 2026
·
Updated

A vulnerability in the filestring() function of the nltk.util module in nltk version 3.9.2 allows arbitrary file read due to improper validation of input paths. The function directly opens files specified by user input without sanitization, enabling attackers to access sensitive system files by providing absolute paths or traversal paths. This vulnerability can be exploited locally or remotely, particularly in scenarios where the function is used in web APIs or other interfaces that accept user-supplied input.

Affected Software

3 affected componentsFixes available
pypi/nltk
nltk nltk=3.9.2
debian/nltk<=3.5-1, <=3.8-1, <=3.9.1-2
3.9.3-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/nltk to a version that resolves this vulnerability.

    Fixed in 3.9.3-1

Event History

Mar 9, 2026
CVE Published
via MITRE·07:19 PM
Data Sourced
via MITRE·07:19 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·08:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·08:16 PM
DescriptionSeverityWeaknessAffected Software
May 25, 2026
Data Sourced
via Ubuntu·10:06 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Debian·10:08 PM
DescriptionAffected Software
Data Sourced
via Launchpad·10:08 PM
Description

Frequently Asked Questions

1

What is the severity of CVE-2026-0846?

CVE-2026-0846 is considered a high severity vulnerability due to its potential for arbitrary file read.

2

How do I fix CVE-2026-0846?

To fix CVE-2026-0846, ensure that you update the NLTK library to a version that addresses the input validation issue.

3

What causes CVE-2026-0846?

CVE-2026-0846 is caused by improper validation of input paths in the `filestring()` function allowing for arbitrary file access.

4

Which versions of NLTK are affected by CVE-2026-0846?

CVE-2026-0846 affects NLTK version 3.9.2 and potentially earlier versions that use the `filestring()` function.

5

Is there a workaround for CVE-2026-0846?

A workaround for CVE-2026-0846 involves restricting user input to safe file paths prior to calling the `filestring()` function.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203