Vulnerabilities > CVE-2019-15795 - Use of a Broken or Risky Cryptographic Algorithm vulnerability in multiple products
Attack vector
NETWORK Attack complexity
HIGH Privileges required
NONE Confidentiality impact
NONE Integrity impact
PARTIAL Availability impact
NONE Summary
python-apt only checks the MD5 sums of downloaded files in `Version.fetch_binary()` and `Version.fetch_source()` of apt/package.py in version 1.9.0ubuntu1 and earlier. This allows a man-in-the-middle attack which could potentially be used to install altered packages and has been fixed in versions 1.9.0ubuntu1.2, 1.6.5ubuntu0.1, 1.1.0~beta1ubuntu0.16.04.7, 0.9.3.5ubuntu3+esm2, and 0.8.3ubuntu7.5.
Vulnerable Configurations
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Encryption Brute Forcing An attacker, armed with the cipher text and the encryption algorithm used, performs an exhaustive (brute force) search on the key space to determine the key that decrypts the cipher text to obtain the plaintext.
- Creating a Rogue Certificate Authority Certificate An attacker exploits a weakness in the MD5 hash algorithm (weak collision resistance) to generate a certificate signing request (CSR) that contains collision blocks in the "to be signed" part. The attacker specially crafts two different, but valid X.509 certificates that when hashed with the MD5 algorithm would yield the same value. The attacker then sends the CSR for one of the certificates to the Certification Authority which uses the MD5 hashing algorithm. That request is completely valid and the Certificate Authority issues an X.509 certificate to the attacker which is signed with its private key. An attacker then takes that signed blob and inserts it into another X.509 certificate that the attacker generated. Due to the MD5 collision, both certificates, though different, hash to the same value and so the signed blob works just as well in the second certificate. The net effect is that the attackers' second X.509 certificate, which the Certification Authority has never seen, is now signed and validated by that Certification Authority. To make the attack more interesting, the second certificate could be not just a regular certificate, but rather itself a signing certificate. Thus the attacker is able to start their own Certification Authority that is anchored in its root of trust in the legitimate Certification Authority that has signed the attackers' first X.509 certificate. If the original Certificate Authority was accepted by default by browsers, so will now the Certificate Authority set up by the attacker and of course any certificates that it signs. So the attacker is now able to generate any SSL certificates to impersonate any web server, and the user's browser will not issue any warning to the victim. This can be used to compromise HTTPS communications and other types of systems where PKI and X.509 certificates may be used (e.g., VPN, IPSec) .
- Signature Spoof An attacker generates a message or datablock that causes the recipient to believe that the message or datablock was generated and cryptographically signed by an authoritative or reputable source, misleading a victim or victim operating system into performing malicious actions.
- Cryptanalysis Cryptanalysis is a process of finding weaknesses in cryptographic algorithms and using these weaknesses to decipher the ciphertext without knowing the secret key (instance deduction). Sometimes the weakness is not in the cryptographic algorithm itself, but rather in how it is applied that makes cryptanalysis successful. An attacker may have other goals as well, such as: 1. Total Break - Finding the secret key 2. Global Deduction - Finding a functionally equivalent algorithm for encryption and decryption that does not require knowledge of the secret key. 3. Information Deduction - Gaining some information about plaintexts or ciphertexts that was not previously known 4. Distinguishing Algorithm - The attacker has the ability to distinguish the output of the encryption (ciphertext) from a random permutation of bits The goal of the attacker performing cryptanalysis will depend on the specific needs of the attacker in a given attack context. In most cases, if cryptanalysis is successful at all, an attacker will not be able to go past being able to deduce some information about the plaintext (goal 3). However, that may be sufficient for an attacker, depending on the context.
Nessus
NASL family Debian Local Security Checks NASL id DEBIAN_DSA-4609.NASL description Two security issues were found in the Python interface to the apt package manager; package downloads from unsigned repositories were incorrectly rejected and the hash validation relied on MD5. last seen 2020-04-16 modified 2020-01-27 plugin id 133230 published 2020-01-27 reporter This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/133230 title Debian DSA-4609-1 : python-apt - security update code # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Debian Security Advisory DSA-4609. The text # itself is copyright (C) Software in the Public Interest, Inc. # include("compat.inc"); if (description) { script_id(133230); script_version("1.4"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/04/14"); script_cve_id("CVE-2019-15795", "CVE-2019-15796"); script_xref(name:"DSA", value:"4609"); script_name(english:"Debian DSA-4609-1 : python-apt - security update"); script_summary(english:"Checks dpkg output for the updated package"); script_set_attribute( attribute:"synopsis", value:"The remote Debian host is missing a security-related update." ); script_set_attribute( attribute:"description", value: "Two security issues were found in the Python interface to the apt package manager; package downloads from unsigned repositories were incorrectly rejected and the hash validation relied on MD5." ); script_set_attribute( attribute:"see_also", value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=944696" ); script_set_attribute( attribute:"see_also", value:"https://security-tracker.debian.org/tracker/source-package/python-apt" ); script_set_attribute( attribute:"see_also", value:"https://packages.debian.org/source/stretch/python-apt" ); script_set_attribute( attribute:"see_also", value:"https://packages.debian.org/source/buster/python-apt" ); script_set_attribute( attribute:"see_also", value:"https://www.debian.org/security/2020/dsa-4609" ); script_set_attribute( attribute:"solution", value: "Upgrade the python-apt packages. For the oldstable distribution (stretch), these problems have been fixed in version 1.4.1. For the stable distribution (buster), these problems have been fixed in version 1.8.4.1." ); script_set_cvss_base_vector("CVSS2#AV:N/AC:H/Au:N/C:N/I:P/A:N"); script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N"); script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C"); script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:python-apt"); script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:10.0"); script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:9.0"); script_set_attribute(attribute:"vuln_publication_date", value:"2020/03/26"); script_set_attribute(attribute:"patch_publication_date", value:"2020/01/23"); script_set_attribute(attribute:"plugin_publication_date", value:"2020/01/27"); script_set_attribute(attribute:"generated_plugin", value:"current"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof."); script_family(english:"Debian Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l"); exit(0); } include("audit.inc"); include("debian_package.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian"); if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING); flag = 0; if (deb_check(release:"10.0", prefix:"python-apt", reference:"1.8.4.1")) flag++; if (deb_check(release:"10.0", prefix:"python-apt-common", reference:"1.8.4.1")) flag++; if (deb_check(release:"10.0", prefix:"python-apt-dbg", reference:"1.8.4.1")) flag++; if (deb_check(release:"10.0", prefix:"python-apt-dev", reference:"1.8.4.1")) flag++; if (deb_check(release:"10.0", prefix:"python-apt-doc", reference:"1.8.4.1")) flag++; if (deb_check(release:"10.0", prefix:"python3-apt", reference:"1.8.4.1")) flag++; if (deb_check(release:"10.0", prefix:"python3-apt-dbg", reference:"1.8.4.1")) flag++; if (deb_check(release:"9.0", prefix:"python-apt", reference:"1.4.1")) flag++; if (deb_check(release:"9.0", prefix:"python-apt-common", reference:"1.4.1")) flag++; if (deb_check(release:"9.0", prefix:"python-apt-dbg", reference:"1.4.1")) flag++; if (deb_check(release:"9.0", prefix:"python-apt-dev", reference:"1.4.1")) flag++; if (deb_check(release:"9.0", prefix:"python-apt-doc", reference:"1.4.1")) flag++; if (deb_check(release:"9.0", prefix:"python3-apt", reference:"1.4.1")) flag++; if (deb_check(release:"9.0", prefix:"python3-apt-dbg", reference:"1.4.1")) flag++; if (flag) { if (report_verbosity > 0) security_note(port:0, extra:deb_report_get()); else security_note(0); exit(0); } else audit(AUDIT_HOST_NOT, "affected");
NASL family Debian Local Security Checks NASL id DEBIAN_DLA-2074.NASL description Several issues have been found in python-apt, a python interface to libapt-pkg. CVE-2019-15795 It was discovered that python-apt would still use MD5 hashes to validate certain downloaded packages. If a remote attacker were able to perform a man-in-the-middle attack, this flaw could potentially be used to install altered packages. CVE-2019-15796 It was discovered that python-apt could install packages from untrusted repositories, contrary to expectations. For Debian 8 last seen 2020-04-16 modified 2020-01-24 plugin id 133219 published 2020-01-24 reporter This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/133219 title Debian DLA-2074-1 : python-apt security update code # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Debian Security Advisory DLA-2074-1. The text # itself is copyright (C) Software in the Public Interest, Inc. # include("compat.inc"); if (description) { script_id(133219); script_version("1.4"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/04/14"); script_cve_id("CVE-2019-15795", "CVE-2019-15796"); script_name(english:"Debian DLA-2074-1 : python-apt security update"); script_summary(english:"Checks dpkg output for the updated packages."); script_set_attribute( attribute:"synopsis", value:"The remote Debian host is missing a security update." ); script_set_attribute( attribute:"description", value: "Several issues have been found in python-apt, a python interface to libapt-pkg. CVE-2019-15795 It was discovered that python-apt would still use MD5 hashes to validate certain downloaded packages. If a remote attacker were able to perform a man-in-the-middle attack, this flaw could potentially be used to install altered packages. CVE-2019-15796 It was discovered that python-apt could install packages from untrusted repositories, contrary to expectations. For Debian 8 'Jessie', these problems have been fixed in version 0.9.3.13. We recommend that you upgrade your python-apt packages. NOTE: Tenable Network Security has extracted the preceding description block directly from the DLA security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues." ); script_set_attribute( attribute:"see_also", value:"https://lists.debian.org/debian-lts-announce/2020/01/msg00020.html" ); script_set_attribute( attribute:"see_also", value:"https://packages.debian.org/source/jessie/python-apt" ); script_set_attribute(attribute:"solution", value:"Upgrade the affected packages."); script_set_cvss_base_vector("CVSS2#AV:N/AC:H/Au:N/C:N/I:P/A:N"); script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N"); script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C"); script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:python-apt"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:python-apt-common"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:python-apt-dbg"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:python-apt-dev"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:python-apt-doc"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:python3-apt"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:python3-apt-dbg"); script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:8.0"); script_set_attribute(attribute:"vuln_publication_date", value:"2020/03/26"); script_set_attribute(attribute:"patch_publication_date", value:"2020/01/23"); script_set_attribute(attribute:"plugin_publication_date", value:"2020/01/24"); script_set_attribute(attribute:"generated_plugin", value:"current"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof."); script_family(english:"Debian Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l"); exit(0); } include("audit.inc"); include("debian_package.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian"); if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING); flag = 0; if (deb_check(release:"8.0", prefix:"python-apt", reference:"0.9.3.13")) flag++; if (deb_check(release:"8.0", prefix:"python-apt-common", reference:"0.9.3.13")) flag++; if (deb_check(release:"8.0", prefix:"python-apt-dbg", reference:"0.9.3.13")) flag++; if (deb_check(release:"8.0", prefix:"python-apt-dev", reference:"0.9.3.13")) flag++; if (deb_check(release:"8.0", prefix:"python-apt-doc", reference:"0.9.3.13")) flag++; if (deb_check(release:"8.0", prefix:"python3-apt", reference:"0.9.3.13")) flag++; if (deb_check(release:"8.0", prefix:"python3-apt-dbg", reference:"0.9.3.13")) flag++; if (flag) { if (report_verbosity > 0) security_note(port:0, extra:deb_report_get()); else security_note(0); exit(0); } else audit(AUDIT_HOST_NOT, "affected");
NASL family Ubuntu Local Security Checks NASL id UBUNTU_USN-4247-1.NASL description It was discovered that python-apt would still use MD5 hashes to validate certain downloaded packages. If a remote attacker were able to perform a man-in-the-middle attack, this flaw could potentially be used to install altered packages. (CVE-2019-15795) It was discovered that python-apt could install packages from untrusted repositories, contrary to expectations. (CVE-2019-15796). Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-04-16 modified 2020-01-23 plugin id 133205 published 2020-01-23 reporter Ubuntu Security Notice (C) 2020 Canonical, Inc. / NASL script (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/133205 title Ubuntu 16.04 LTS / 18.04 LTS / 19.04 / 19.10 : python-apt vulnerabilities (USN-4247-1) NASL family Ubuntu Local Security Checks NASL id UBUNTU_USN-4247-2.NASL description USN-4247-1 fixed vulnerabilities in python-apt. The updated packages caused a regression when attempting to upgrade to a new Ubuntu release. This update fixes the problem. We apologize for the inconvenience. Original advisory details : It was discovered that python-apt would still use MD5 hashes to validate certain downloaded packages. If a remote attacker were able to perform a man-in-the-middle attack, this flaw could potentially be used to install altered packages. (CVE-2019-15795) It was discovered that python-apt could install packages from untrusted repositories, contrary to expectations. (CVE-2019-15796). Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-04-16 modified 2020-01-23 plugin id 133206 published 2020-01-23 reporter Ubuntu Security Notice (C) 2020 Canonical, Inc. / NASL script (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/133206 title Ubuntu 16.04 LTS / 18.04 LTS / 19.04 / 19.10 : python-apt regression (USN-4247-2)