Vulnerabilities in pkg:pypi/docutils

PACKAGE
Advisory Identifier: GHSA-cg75-6938-wx58
Advisory Summary

CVE-2009-5042 is a CRITICAL (CVSS 9.1) python-docutils allows insecure usage of vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Docutils libraries in the PyPI ecosystem. The issue involves python-docutils allows insecure usage of temporary files. Remediation is available by upgrading affected packages to version 0.6.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/docutils

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/docutils. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-cg75-6938-wx58 CVE-2009-5042 CRITICAL python-docutils allows insecure usage of temporary files

CVE-2009-5042 at a Glance

CVE Identifier CVE-2009-5042
GHSA Identifier GHSA-cg75-6938-wx58
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-668: Exposure of Resource to Wrong Sphere
Affected Product Docutils
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2009-5042

To remediate this vulnerability, upgrade all affected Docutils dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

docutils fixed: 0.6
pip install docutils>=0.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show docutils

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2009-5042, inspect your installed packages using pip:

pip show docutils

Analyze the terminal output to locate any version of Docutils in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6), your application is affected.

Note: The pip show docutils command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In Docutils, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

python-docutils allows insecure usage of temporary files.

CVE-2009-5042 Affected Docutils Versions

1 component(s)
Fixed Versions:
0.6
Product / Package Ecosystem Affected Versions Fixed Version
docutils
PyPI
≥ 0.5
< 0.6
0.6

References

Frequently Asked Questions

What is CVE-2009-5042?
CVE-2009-5042 is a security vulnerability in Docutils involving python-docutils allows insecure usage of temporary files under CWE-668: Exposure of Resource to Wrong Sphere.
Which Docutils versions are affected?
Affected versions include releases prior to 0.6 across affected packages: docutils.
What version fixes CVE-2009-5042?
Upgrading to 0.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is docutils affected?
Yes, docutils is affected in releases prior to 0.6. Upgrade your dependency to 0.6 or later.
What is the CVSS score of CVE-2009-5042?
CVE-2009-5042 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2009-5042?
CVE-2009-5042 is classified under CWE-668: Exposure of Resource to Wrong Sphere (The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.).
How can I check PyPI dependencies for CVE-2009-5042?
Run the dependency tree command: 'pip show docutils'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-cg75-6938-wx58",
  "modified" : "2024-09-20T14:58:26Z",
  "published" : "2020-03-13T20:04:51Z",
  "aliases" : [ "CVE-2009-5042" ],
  "summary" : "python-docutils allows insecure usage of temporary files",
  "details" : "python-docutils allows insecure usage of temporary files.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "docutils"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.5"
      }, {
        "fixed" : "0.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2009-5042"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560755"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-cg75-6938-wx58"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/docutils/PYSEC-2019-176.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://security-tracker.debian.org/tracker/CVE-2009-5042"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-668" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-03-13T20:03:40Z",
    "nvd_published_at" : null
  }
}