Vulnerabilities > CVE-2013-7440 - Data Processing Errors vulnerability in Python

047910
CVSS 4.3 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
PARTIAL
Availability impact
NONE
network
python
CWE-19
nessus

Summary

The ssl.match_hostname function in CPython (aka Python) before 2.7.9 and 3.x before 3.3.3 does not properly handle wildcards in hostnames, which might allow man-in-the-middle attackers to spoof servers via a crafted certificate.

Vulnerable Configurations

Part Description Count
Application
Python
106

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • XML Nested Payloads
    Applications often need to transform data in and out of the XML format by using an XML parser. It may be possible for an attacker to inject data that may have an adverse effect on the XML parser when it is being processed. By nesting XML data and causing this data to be continuously self-referential, an attacker can cause the XML parser to consume more resources while processing, causing excessive memory consumption and CPU utilization. An attacker's goal is to leverage parser failure to his or her advantage. In most cases this type of an attack will result in a denial of service due to an application becoming unstable, freezing, or crash. However it may be possible to cause a crash resulting in arbitrary code execution, leading to a jump from the data plane to the control plane [R.230.1].
  • XML Oversized Payloads
    Applications often need to transform data in and out of the XML format by using an XML parser. It may be possible for an attacker to inject data that may have an adverse effect on the XML parser when it is being processed. By supplying oversized payloads in input vectors that will be processed by the XML parser, an attacker can cause the XML parser to consume more resources while processing, causing excessive memory consumption and CPU utilization, and potentially cause execution of arbitrary code. An attacker's goal is to leverage parser failure to his or her advantage. In many cases this type of an attack will result in a denial of service due to an application becoming unstable, freezing, or crash. However it is possible to cause a crash resulting in arbitrary code execution, leading to a jump from the data plane to the control plane [R.231.1].
  • XML Client-Side Attack
    Client applications such as web browsers that process HTML data often need to transform data in and out of the XML format by using an XML parser. It may be possible for an attacker to inject data that may have an adverse effect on the XML parser when it is being processed. These adverse effects may include the parser crashing, consuming too much of a resource, executing too slowly, executing code supplied by an attacker, allowing usage of unintended system functionality, etc. An attacker's goal is to leverage parser failure to his or her advantage. In some cases it may be possible to jump from the data plane to the control plane via bad data being passed to an XML parser. [R.484.1]
  • XML Parser Attack
    Applications often need to transform data in and out of the XML format by using an XML parser. It may be possible for an attacker to inject data that may have an adverse effect on the XML parser when it is being processed. These adverse effects may include the parser crashing, consuming too much of a resource, executing too slowly, executing code supplied by an attacker, allowing usage of unintended system functionality, etc. An attacker's goal is to leverage parser failure to his or her advantage. In some cases it may be possible to jump from the data plane to the control plane via bad data being passed to an XML parser. [R.99.1]

Nessus

  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2015-11995.NASL
    descriptionSecurity fix for CVE-2013-7440 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-05
    modified2015-08-17
    plugin id85420
    published2015-08-17
    reporterThis script is Copyright (C) 2015-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/85420
    titleFedora 21 : bzr-2.6.0-7.fc21 (2015-11995)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Fedora Security Advisory 2015-11995.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(85420);
      script_version("2.5");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04");
    
      script_cve_id("CVE-2013-7440");
      script_xref(name:"FEDORA", value:"2015-11995");
    
      script_name(english:"Fedora 21 : bzr-2.6.0-7.fc21 (2015-11995)");
      script_summary(english:"Checks rpm output for the updated package.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Fedora host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Security fix for CVE-2013-7440
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the Fedora 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://bugzilla.redhat.com/show_bug.cgi?id=1224999"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2015-August/163883.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?e30b002f"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected bzr package.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:P/A:N");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:bzr");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:21");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2015/07/28");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/08/17");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2015-2020 Tenable Network Security, Inc.");
      script_family(english:"Fedora Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/RedHat/release");
    if (isnull(release) || "Fedora" >!< release) audit(AUDIT_OS_NOT, "Fedora");
    os_ver = eregmatch(pattern: "Fedora.*release ([0-9]+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora");
    os_ver = os_ver[1];
    if (! ereg(pattern:"^21([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 21.x", "Fedora " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Fedora", cpu);
    
    flag = 0;
    if (rpm_check(release:"FC21", reference:"bzr-2.6.0-7.fc21")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "bzr");
    }
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2015-12001.NASL
    descriptionSecurity fix for CVE-2013-7440 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-05
    modified2015-08-17
    plugin id85421
    published2015-08-17
    reporterThis script is Copyright (C) 2015-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/85421
    titleFedora 22 : bzr-2.6.0-8.fc22 (2015-12001)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Fedora Security Advisory 2015-12001.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(85421);
      script_version("2.5");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04");
    
      script_cve_id("CVE-2013-7440");
      script_xref(name:"FEDORA", value:"2015-12001");
    
      script_name(english:"Fedora 22 : bzr-2.6.0-8.fc22 (2015-12001)");
      script_summary(english:"Checks rpm output for the updated package.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Fedora host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Security fix for CVE-2013-7440
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the Fedora 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://bugzilla.redhat.com/show_bug.cgi?id=1224999"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2015-August/163879.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?01520a55"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected bzr package.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:P/A:N");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:bzr");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:22");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2015/07/28");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/08/17");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2015-2020 Tenable Network Security, Inc.");
      script_family(english:"Fedora Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/RedHat/release");
    if (isnull(release) || "Fedora" >!< release) audit(AUDIT_OS_NOT, "Fedora");
    os_ver = eregmatch(pattern: "Fedora.*release ([0-9]+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora");
    os_ver = os_ver[1];
    if (! ereg(pattern:"^22([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 22.x", "Fedora " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Fedora", cpu);
    
    flag = 0;
    if (rpm_check(release:"FC22", reference:"bzr-2.6.0-8.fc22")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "bzr");
    }
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2016-52B294538D.NASL
    descriptionSecurity fix for CVE-2013-2099, CVE-2013-7440 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-05
    modified2016-03-04
    plugin id89544
    published2016-03-04
    reporterThis script is Copyright (C) 2016-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/89544
    titleFedora 22 : python-pymongo-2.5.2-8.fc22 (2016-52b294538d)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2016-50ABC3E885.NASL
    descriptionSecurity fix for CVE-2013-2099, CVE-2013-7440 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-05
    modified2016-03-04
    plugin id89540
    published2016-03-04
    reporterThis script is Copyright (C) 2016-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/89540
    titleFedora 23 : python-pymongo-2.5.2-8.fc23 (2016-50abc3e885)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_SU-2015-1651-1.NASL
    descriptionpython-setuptools was updated to fix one security issue. The following vulnerability was fixed : - CVE-2013-7440: Non-RFC6125-compliant host name matching was incorrect (bsc#930189) Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id86217
    published2015-10-01
    reporterThis script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/86217
    titleSUSE SLED11 Security Update : Recommended update for python-setuptools (SUSE-SU-2015:1651-1)

Redhat

advisories
rhsa
idRHSA-2016:1166
rpms
  • python27-0:1.1-25.el6
  • python27-0:1.1-25.el7
  • python27-PyYAML-0:3.10-14.el6
  • python27-PyYAML-0:3.10-14.el7
  • python27-PyYAML-debuginfo-0:3.10-14.el6
  • python27-PyYAML-debuginfo-0:3.10-14.el7
  • python27-numpy-1:1.7.1-10.el6
  • python27-numpy-1:1.7.1-10.el7
  • python27-numpy-debuginfo-1:1.7.1-10.el6
  • python27-numpy-debuginfo-1:1.7.1-10.el7
  • python27-numpy-f2py-1:1.7.1-10.el6
  • python27-numpy-f2py-1:1.7.1-10.el7
  • python27-python-0:2.7.8-14.el7
  • python27-python-0:2.7.8-16.el6
  • python27-python-bson-0:3.2.1-1.el6
  • python27-python-bson-0:3.2.1-1.el7
  • python27-python-debug-0:2.7.8-14.el7
  • python27-python-debug-0:2.7.8-16.el6
  • python27-python-debuginfo-0:2.7.8-14.el7
  • python27-python-debuginfo-0:2.7.8-16.el6
  • python27-python-devel-0:2.7.8-14.el7
  • python27-python-devel-0:2.7.8-16.el6
  • python27-python-docutils-0:0.11-2.el6
  • python27-python-libs-0:2.7.8-14.el7
  • python27-python-libs-0:2.7.8-16.el6
  • python27-python-pip-0:7.1.0-2.el6
  • python27-python-pip-0:7.1.0-2.el7
  • python27-python-pymongo-0:3.2.1-1.el6
  • python27-python-pymongo-0:3.2.1-1.el7
  • python27-python-pymongo-debuginfo-0:3.2.1-1.el6
  • python27-python-pymongo-debuginfo-0:3.2.1-1.el7
  • python27-python-pymongo-doc-0:3.2.1-1.el6
  • python27-python-pymongo-doc-0:3.2.1-1.el7
  • python27-python-pymongo-gridfs-0:3.2.1-1.el6
  • python27-python-pymongo-gridfs-0:3.2.1-1.el7
  • python27-python-test-0:2.7.8-14.el7
  • python27-python-test-0:2.7.8-16.el6
  • python27-python-tools-0:2.7.8-14.el7
  • python27-python-tools-0:2.7.8-16.el6
  • python27-python-virtualenv-0:13.1.0-1.el6
  • python27-python-virtualenv-0:13.1.0-1.el7
  • python27-runtime-0:1.1-25.el6
  • python27-runtime-0:1.1-25.el7
  • python27-scipy-0:0.12.1-3.el6
  • python27-scipy-0:0.12.1-4.el7
  • python27-scipy-debuginfo-0:0.12.1-3.el6
  • python27-scipy-debuginfo-0:0.12.1-4.el7
  • python27-scldevel-0:1.1-25.el6
  • python27-scldevel-0:1.1-25.el7
  • python27-tkinter-0:2.7.8-14.el7
  • python27-tkinter-0:2.7.8-16.el6