Vulnerabilities in pkg:pypi/pypiserver

PACKAGE
Advisory Identifier: GHSA-mh24-7wvg-v88g
Advisory Summary

CVE-2019-6802 is a MODERATE (CVSS 6.1) crlf injection vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Pypiserver libraries in the PyPI ecosystem. The issue involves crlf injection in pypiserver. Remediation is available by upgrading affected packages to version 1.2.6.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/pypiserver

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-mh24-7wvg-v88g CVE-2019-6802 MODERATE CRLF Injection in pypiserver

CVE-2019-6802 at a Glance

CVE Identifier CVE-2019-6802
GHSA Identifier GHSA-mh24-7wvg-v88g
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Pypiserver
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.1

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

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

How to Fix CVE-2019-6802

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

pypiserver fixed: 1.2.6
pip install pypiserver>=1.2.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 pypiserver

How to Check if You Are Affected

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

pip show pypiserver

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Pypiserver, 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

CRLF Injection in pypiserver 1.2.5 and below allows attackers to set arbitrary HTTP headers and possibly conduct XSS attacks via a `%0d%0a` in a URI.

CVE-2019-6802 Affected Pypiserver Versions

1 component(s)
Fixed Versions:
1.2.6
Product / Package Ecosystem Affected Versions Fixed Version
pypiserver
PyPI
< 1.2.6
1.2.6

References

Frequently Asked Questions

What is CVE-2019-6802?
CVE-2019-6802 is a security vulnerability in Pypiserver involving CRLF Injection in pypiserver under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Pypiserver versions are affected?
Affected versions include releases prior to 1.2.6 across affected packages: pypiserver.
What version fixes CVE-2019-6802?
Upgrading to 1.2.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pypiserver affected?
Yes, pypiserver is affected in releases prior to 1.2.6. Upgrade your dependency to 1.2.6 or later.
What is the CVSS score of CVE-2019-6802?
CVE-2019-6802 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2019-6802?
CVE-2019-6802 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check PyPI dependencies for CVE-2019-6802?
Run the dependency tree command: 'pip show pypiserver'. 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-mh24-7wvg-v88g",
  "modified" : "2024-10-15T16:01:01Z",
  "published" : "2019-01-30T20:56:26Z",
  "aliases" : [ "CVE-2019-6802" ],
  "summary" : "CRLF Injection in pypiserver",
  "details" : "CRLF Injection in pypiserver 1.2.5 and below allows attackers to set arbitrary HTTP headers and possibly conduct XSS attacks via a `%0d%0a` in a URI.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pypiserver"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.6"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.2.5"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-6802"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypiserver/pypiserver/issues/237"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypiserver/pypiserver/commit/1375a67c55a9b8d4619df30d2a1c0b239d7357e6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pypiserver/PYSEC-2019-113.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pypiserver/pypiserver"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74", "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:46:14Z",
    "nvd_published_at" : "2019-01-25T04:29:00Z"
  }
}