CVE-2021-45848: Nicotine plus Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-p4v2-r99v-wjc2
CVSS 7.5
CWE-116
Published
Advisory Summary

CVE-2021-45848 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Nicotine plus libraries in the PyPI ecosystem. The issue involves nicotine+ dos on null character in download request. Remediation is available by upgrading affected packages to version 3.2.1.

CVE-2021-45848 at a Glance

CVE Identifier CVE-2021-45848
GHSA Identifier GHSA-p4v2-r99v-wjc2
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product Nicotine plus
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

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:N/I:N/A:H).

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 None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2021-45848

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

nicotine-plus fixed: 3.2.1
pip install nicotine-plus>=3.2.1
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 nicotine-plus

How to Check if You Are Affected

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

pip show nicotine-plus

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Nicotine plus, 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

Denial of service (DoS) vulnerability in Nicotine+ starting with version 3.0.3 and prior to version 3.2.1 allows a user with a modified Soulseek client to crash Nicotine+ by sending a file download request with a file path containing a null character.

CVE-2021-45848 Affected Nicotine plus Versions

1 component(s)
Fixed Versions:
3.2.1
Product / Package Ecosystem Affected Versions Fixed Version
nicotine-plus
PyPI
≥ 3.0.3
< 3.2.1
3.2.1

References

Frequently Asked Questions

What is CVE-2021-45848?
CVE-2021-45848 is a security vulnerability in Nicotine plus involving Nicotine+ DoS on Null Character in Download Request under CWE-116: Improper Encoding or Escaping of Output.
Which Nicotine plus versions are affected?
Affected versions include releases prior to 3.2.1 across affected packages: nicotine-plus.
What version fixes CVE-2021-45848?
Upgrading to 3.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nicotine-plus affected?
Yes, nicotine-plus is affected in releases prior to 3.2.1. Upgrade your dependency to 3.2.1 or later.
What is the CVSS score of CVE-2021-45848?
CVE-2021-45848 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2021-45848?
CVE-2021-45848 is classified under CWE-116: Improper Encoding or Escaping of Output (The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.).
How can I check PyPI dependencies for CVE-2021-45848?
Run the dependency tree command: 'pip show nicotine-plus'. 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-p4v2-r99v-wjc2",
  "modified" : "2023-09-05T19:58:23Z",
  "published" : "2022-03-16T00:00:38Z",
  "aliases" : [ "CVE-2021-45848" ],
  "summary" : "Nicotine+ DoS on Null Character in Download Request",
  "details" : "Denial of service (DoS) vulnerability in Nicotine+ starting with version 3.0.3 and prior to version 3.2.1 allows a user with a modified Soulseek client to crash Nicotine+ by sending a file download request with a file path containing a null character.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "nicotine-plus"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.3"
      }, {
        "fixed" : "3.2.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-45848"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nicotine-plus/nicotine-plus/issues/1777"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nicotine-plus/nicotine-plus/commit/0e3e2fac27a518f0a84330f1ddf1193424522045"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nicotine-plus/nicotine-plus"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HWYV53KERFH2EC4XI2IVVQFTV75E5XM6"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202210-20"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-116" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-03-29T15:19:03Z",
    "nvd_published_at" : "2022-03-15T19:15:00Z"
  }
}