Vulnerabilities > CVE-2008-4870 - Incorrect Permission Assignment for Critical Resource vulnerability in Dovecot 1.0.7

047910
CVSS 2.1 - LOW
Attack vector
LOCAL
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
NONE
Availability impact
NONE
local
low complexity
dovecot
CWE-732
nessus

Summary

dovecot 1.0.7 in Red Hat Enterprise Linux (RHEL) 5, and possibly Fedora, uses world-readable permissions for dovecot.conf, which allows local users to obtain the ssl_key_password parameter value.

Vulnerable Configurations

Part Description Count
Application
Dovecot
1
OS
Redhat
1

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Accessing Functionality Not Properly Constrained by ACLs
    In applications, particularly web applications, access to functionality is mitigated by the authorization framework, whose job it is to map ACLs to elements of the application's functionality; particularly URL's for web apps. In the case that the administrator failed to specify an ACL for a particular element, an attacker may be able to access it with impunity. An attacker with the ability to access functionality not properly constrained by ACLs can obtain sensitive information and possibly compromise the entire application. Such an attacker can access resources that must be available only to users at a higher privilege level, can access management sections of the application or can run queries for data that he is otherwise not supposed to.
  • Privilege Abuse
    An adversary is able to exploit features of the target that should be reserved for privileged users or administrators but are exposed to use by lower or non-privileged accounts. Access to sensitive information and functionality must be controlled to ensure that only authorized users are able to access these resources. If access control mechanisms are absent or misconfigured, a user may be able to access resources that are intended only for higher level users. An adversary may be able to exploit this to utilize a less trusted account to gain information and perform activities reserved for more trusted accounts. This attack differs from privilege escalation and other privilege stealing attacks in that the adversary never actually escalates their privileges but instead is able to use a lesser degree of privilege to access resources that should be (but are not) reserved for higher privilege accounts. Likewise, the adversary does not exploit trust or subvert systems - all control functionality is working as configured but the configuration does not adequately protect sensitive resources at an appropriate level.
  • Directory Indexing
    An adversary crafts a request to a target that results in the target listing/indexing the content of a directory as output. One common method of triggering directory contents as output is to construct a request containing a path that terminates in a directory name rather than a file name since many applications are configured to provide a list of the directory's contents when such a request is received. An adversary can use this to explore the directory tree on a target as well as learn the names of files. This can often end up revealing test files, backup files, temporary files, hidden files, configuration files, user accounts, script contents, as well as naming conventions, all of which can be used by an attacker to mount additional attacks.
  • Accessing, Modifying or Executing Executable Files
    An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
  • Exploiting Incorrectly Configured Access Control Security Levels
    An attacker exploits a weakness in the configuration of access controls and is able to bypass the intended protection that these measures guard against and thereby obtain unauthorized access to the system or network. Sensitive functionality should always be protected with access controls. However configuring all but the most trivial access control systems can be very complicated and there are many opportunities for mistakes. If an attacker can learn of incorrectly configured access security settings, they may be able to exploit this in an attack. Most commonly, attackers would take advantage of controls that provided too little protection for sensitive activities in order to perform actions that should be denied to them. In some circumstances, an attacker may be able to take advantage of overly restrictive access control policies, initiating denial of services (if an application locks because it unexpectedly failed to be granted access) or causing other legitimate actions to fail due to security. The latter class of attacks, however, is usually less severe and easier to detect than attacks based on inadequate security restrictions. This attack pattern differs from CAPEC 1, "Accessing Functionality Not Properly Constrained by ACLs" in that the latter describes attacks where sensitive functionality lacks access controls, where, in this pattern, the access control is present, but incorrectly configured.

Nessus

  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-200812-16.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-200812-16 (Dovecot: Multiple vulnerabilities) Several vulnerabilities were found in Dovecot: The
    last seen2020-06-01
    modified2020-06-02
    plugin id35108
    published2008-12-15
    reporterThis script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/35108
    titleGLSA-200812-16 : Dovecot: Multiple vulnerabilities
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Gentoo Linux Security Advisory GLSA 200812-16.
    #
    # The advisory text is Copyright (C) 2001-2016 Gentoo Foundation, Inc.
    # and licensed under the Creative Commons - Attribution / Share Alike 
    # license. See http://creativecommons.org/licenses/by-sa/3.0/
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(35108);
      script_version("1.13");
      script_cvs_date("Date: 2019/08/02 13:32:45");
    
      script_cve_id("CVE-2008-4577", "CVE-2008-4578", "CVE-2008-4870", "CVE-2008-4907");
      script_bugtraq_id(31587);
      script_xref(name:"GLSA", value:"200812-16");
    
      script_name(english:"GLSA-200812-16 : Dovecot: Multiple vulnerabilities");
      script_summary(english:"Checks for updated package(s) in /var/db/pkg");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Gentoo host is missing one or more security-related
    patches."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "The remote host is affected by the vulnerability described in GLSA-200812-16
    (Dovecot: Multiple vulnerabilities)
    
        Several vulnerabilities were found in Dovecot:
        The 'k'
        right in the acl_plugin does not work as expected (CVE-2008-4577,
        CVE-2008-4578)
        The dovecot.conf is world-readable, providing
        improper protection for the ssl_key_password setting
        (CVE-2008-4870)
        A permanent Denial of Service with broken mail
        headers is possible (CVE-2008-4907)
      
    Impact :
    
        These vulnerabilities might allow a remote attacker to cause a Denial
        of Service, to circumvent security restrictions or allow local
        attackers to disclose the passphrase of the SSL private key.
      
    Workaround :
    
        There is no known workaround at this time."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security.gentoo.org/glsa/200812-16"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "All Dovecot users should upgrade to the latest version:
        # emerge --sync
        # emerge --ask --oneshot --verbose '>=net-mail/dovecot-1.1.7-r1'
        Users should be aware that dovecot.conf will still be world-readable
        after the update. If employing ssl_key_password, it should not be used
        in dovecot.conf but in a separate file which should be included with
        'include_try'."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:N");
      script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_cwe_id(20, 264);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:gentoo:linux:dovecot");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2008/12/14");
      script_set_attribute(attribute:"plugin_publication_date", value:"2008/12/15");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Gentoo Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Gentoo/release", "Host/Gentoo/qpkg-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("qpkg.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Gentoo/release")) audit(AUDIT_OS_NOT, "Gentoo");
    if (!get_kb_item("Host/Gentoo/qpkg-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    
    if (qpkg_check(package:"net-mail/dovecot", unaffected:make_list("ge 1.1.7-r1"), vulnerable:make_list("lt 1.1.7-r1"))) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:qpkg_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = qpkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "Dovecot");
    }
    
  • NASL familyScientific Linux Local Security Checks
    NASL idSL_20090120_DOVECOT_ON_SL5_X.NASL
    descriptionA flaw was found in Dovecot
    last seen2020-06-01
    modified2020-06-02
    plugin id60524
    published2012-08-01
    reporterThis script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/60524
    titleScientific Linux Security Update : dovecot on SL5.x i386/x86_64
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text is (C) Scientific Linux.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(60524);
      script_version("1.4");
      script_cvs_date("Date: 2019/10/25 13:36:18");
    
      script_cve_id("CVE-2008-4577", "CVE-2008-4870");
    
      script_name(english:"Scientific Linux Security Update : dovecot on SL5.x i386/x86_64");
      script_summary(english:"Checks rpm output for the updated package");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Scientific Linux host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "A flaw was found in Dovecot's ACL plug-in. The ACL plug-in treated
    negative access rights as positive rights, which could allow an
    attacker to bypass intended access restrictions. (CVE-2008-4577)
    
    A password disclosure flaw was found with Dovecot's configuration
    file. If a system had the 'ssl_key_password' option defined, any local
    user could view the SSL key password. (CVE-2008-4870)
    
    Note: This flaw did not allow the attacker to acquire the contents of
    the SSL key. The password has no value without the key file which
    arbitrary users should not have read access to.
    
    To better protect even this value, however, the dovecot.conf file now
    supports the '!include_try' directive. The ssl_key_password option
    should be moved from dovecot.conf to a new file owned by, and only
    readable and writable by, root (ie 0600). This file should be
    referenced from dovecot.conf by setting the '!include_try
    [/path/to/password/file]' option.
    
    Additionally, this update addresses the following bugs :
    
      - the dovecot init script -- /etc/rc.d/init.d/dovecot --
        did not check if the dovecot binary or configuration
        files existed. It also used the wrong pid file for
        checking the dovecot service's status. This update
        includes a new init script that corrects these errors.
    
      - the %files section of the dovecot spec file did not
        include '%dir %{ssldir}/private'. As a consequence, the
        /etc/pki/private/ directory was not owned by dovecot.
        (Note: files inside /etc/pki/private/ were and are owned
        by dovecot.) With this update, the missing line has been
        added to the spec file, and the noted directory is now
        owned by dovecot.
    
      - in some previously released versions of dovecot, the
        authentication process accepted (and passed along
        un-escaped) passwords containing characters that had
        special meaning to dovecot's internal protocols. This
        updated release prevents such passwords from being
        passed back, instead returning the error, 'Attempted
        login with password having illegal chars'.
    
    Note: dovecot versions previously shipped with Scientific Linux 5 did
    not allow this behavior. This update addresses the issue above but
    said issue was only present in versions of dovecot not previously
    included with Scientific Linux 5."
      );
      # https://listserv.fnal.gov/scripts/wa.exe?A2=ind0901&L=scientific-linux-errata&T=0&P=1781
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?e8523540"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected dovecot package."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:N");
      script_cwe_id(264);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"x-cpe:/o:fermilab:scientific_linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2009/01/20");
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/08/01");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Scientific Linux Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/cpu", "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) || "Scientific Linux " >!< release) audit(AUDIT_HOST_NOT, "running Scientific Linux");
    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 (cpu >!< "x86_64" && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Scientific Linux", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"SL5", reference:"dovecot-1.0.7-7.el5")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2009-0205.NASL
    descriptionAn updated dovecot package that corrects two security flaws and various bugs is now available for Red Hat Enterprise Linux 5. This update has been rated as having low security impact by the Red Hat Security Response Team. Dovecot is an IMAP server for Linux and UNIX-like systems, primarily written with security in mind. A flaw was found in Dovecot
    last seen2020-06-01
    modified2020-06-02
    plugin id35433
    published2009-01-21
    reporterThis script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/35433
    titleRHEL 5 : dovecot (RHSA-2009:0205)

Oval

accepted2013-04-29T04:08:37.892-04:00
classvulnerability
contributors
  • nameAharon Chernin
    organizationSCAP.com, LLC
  • nameDragos Prisaca
    organizationG2, Inc.
definition_extensions
  • commentThe operating system installed on the system is Red Hat Enterprise Linux 5
    ovaloval:org.mitre.oval:def:11414
  • commentThe operating system installed on the system is CentOS Linux 5.x
    ovaloval:org.mitre.oval:def:15802
  • commentOracle Linux 5.x
    ovaloval:org.mitre.oval:def:15459
descriptiondovecot 1.0.7 in Red Hat Enterprise Linux (RHEL) 5, and possibly Fedora, uses world-readable permissions for dovecot.conf, which allows local users to obtain the ssl_key_password parameter value.
familyunix
idoval:org.mitre.oval:def:10776
statusaccepted
submitted2010-07-09T03:56:16-04:00
titledovecot 1.0.7 in Red Hat Enterprise Linux (RHEL) 5, and possibly Fedora, uses world-readable permissions for dovecot.conf, which allows local users to obtain the ssl_key_password parameter value.
version19

Redhat

advisories
bugzilla
id469659
titleCVE-2008-4870 dovecot: ssl_key_password disclosure due to an insecure dovecot.conf permissions
oval
OR
  • commentRed Hat Enterprise Linux must be installed
    ovaloval:com.redhat.rhba:tst:20070304026
  • AND
    • commentRed Hat Enterprise Linux 5 is installed
      ovaloval:com.redhat.rhba:tst:20070331005
    • commentdovecot is earlier than 0:1.0.7-7.el5
      ovaloval:com.redhat.rhsa:tst:20090205001
    • commentdovecot is signed with Red Hat redhatrelease key
      ovaloval:com.redhat.rhsa:tst:20080297002
rhsa
idRHSA-2009:0205
released2009-01-20
severityLow
titleRHSA-2009:0205: dovecot security and bug fix update (Low)
rpms
  • dovecot-0:1.0.7-7.el5
  • dovecot-debuginfo-0:1.0.7-7.el5