Vulnerabilities > CVE-2014-0466 - Arbitrary Command Execution vulnerability in GNU A2Ps 4.14

047910
CVSS 6.8 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
gnu
nessus

Summary

The fixps script in a2ps 4.14 does not use the -dSAFER option when executing gs, which allows context-dependent attackers to delete arbitrary files or execute arbitrary commands via a crafted PostScript file.

Vulnerable Configurations

Part Description Count
Application
Gnu
1

Nessus

  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-201701-67.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-201701-67 (a2ps: Arbitrary code execution) a2ps’ fixps script does not invoke gs with the -dSAFER option. Impact : Remote attackers, by enticing a user to process a specially crafted PostScript file, could delete arbitrary files or execute arbitrary code with the privileges of the process. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id96853
    published2017-01-30
    reporterThis script is Copyright (C) 2017 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/96853
    titleGLSA-201701-67 : a2ps: Arbitrary code execution
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Gentoo Linux Security Advisory GLSA 201701-67.
    #
    # The advisory text is Copyright (C) 2001-2017 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(96853);
      script_version("$Revision: 3.1 $");
      script_cvs_date("$Date: 2017/01/30 15:10:04 $");
    
      script_cve_id("CVE-2014-0466");
      script_xref(name:"GLSA", value:"201701-67");
    
      script_name(english:"GLSA-201701-67 : a2ps: Arbitrary code execution");
      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-201701-67
    (a2ps: Arbitrary code execution)
    
        a2ps’ fixps script does not invoke gs with the -dSAFER option.
      
    Impact :
    
        Remote attackers, by enticing a user to process a specially crafted
          PostScript file, could delete arbitrary files or execute arbitrary code
          with the privileges of the process.
      
    Workaround :
    
        There is no known workaround at this time."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security.gentoo.org/glsa/201701-67"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "All a2ps users should upgrade to the latest version:
          # emerge --sync
          # emerge --ask --oneshot --verbose '>=app-text/a2ps-4.14-r5'"
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:gentoo:linux:a2ps");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2017/01/29");
      script_set_attribute(attribute:"plugin_publication_date", value:"2017/01/30");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2017 Tenable Network Security, Inc.");
      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:"app-text/a2ps", unaffected:make_list("ge 4.14-r5"), vulnerable:make_list("lt 4.14-r5"))) 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, "a2ps");
    }
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-2892.NASL
    descriptionSeveral vulnerabilities have been found in a2ps, an
    last seen2020-03-17
    modified2014-04-01
    plugin id73278
    published2014-04-01
    reporterThis script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/73278
    titleDebian DSA-2892-1 : a2ps - security update
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Debian Security Advisory DSA-2892. The text 
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(73278);
      script_version("1.8");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/12");
    
      script_cve_id("CVE-2001-1593", "CVE-2014-0466");
      script_bugtraq_id(65294);
      script_xref(name:"DSA", value:"2892");
    
      script_name(english:"Debian DSA-2892-1 : a2ps - 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:
    "Several vulnerabilities have been found in a2ps, an 'Anything to
    PostScript' converter and pretty-printer. The Common Vulnerabilities
    and Exposures project identifies the following problems :
    
      - CVE-2001-1593
        The spy_user function which is called when a2ps is
        invoked with the --debug flag insecurely used temporary
        files.
    
      - CVE-2014-0466
        Brian M. Carlson reported that a2ps's fixps script does
        not invoke gs with the -dSAFER option. Consequently
        executing fixps on a malicious PostScript file could
        result in files being deleted or arbitrary commands
        being executed with the privileges of the user running
        fixps."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=737385"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742902"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2001-1593"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2014-0466"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://packages.debian.org/source/squeeze/a2ps"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://packages.debian.org/source/wheezy/a2ps"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.debian.org/security/2014/dsa-2892"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Upgrade the a2ps packages.
    
    For the oldstable distribution (squeeze), these problems have been
    fixed in version 1:4.14-1.1+deb6u1.
    
    For the stable distribution (wheezy), these problems have been fixed
    in version 1:4.14-1.1+deb7u1."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:a2ps");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:6.0");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:7.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2014/03/31");
      script_set_attribute(attribute:"plugin_publication_date", value:"2014/04/01");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2014-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:"6.0", prefix:"a2ps", reference:"1:4.14-1.1+deb6u1")) flag++;
    if (deb_check(release:"7.0", prefix:"a2ps", reference:"1:4.14-1.1+deb7u1")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2014-4676.NASL
    descriptionThis update fixes a security problem in the fixps utility (CVE-2014-0466). 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-03-17
    modified2014-05-09
    plugin id73925
    published2014-05-09
    reporterThis script is Copyright (C) 2014-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/73925
    titleFedora 19 : a2ps-4.14-23.fc19 (2014-4676)
    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 2014-4676.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(73925);
      script_version("1.3");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/12");
    
      script_cve_id("CVE-2014-0466");
      script_xref(name:"FEDORA", value:"2014-4676");
    
      script_name(english:"Fedora 19 : a2ps-4.14-23.fc19 (2014-4676)");
      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:
    "This update fixes a security problem in the fixps utility
    (CVE-2014-0466).
    
    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=1082410"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2014-May/132911.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?89f08666"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected a2ps package.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:a2ps");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:19");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2014/04/02");
      script_set_attribute(attribute:"plugin_publication_date", value:"2014/05/09");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2014-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:"^19([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 19.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:"FC19", reference:"a2ps-4.14-23.fc19")) 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, "a2ps");
    }
    
  • NASL familyMandriva Local Security Checks
    NASL idMANDRIVA_MDVSA-2014-076.NASL
    descriptionUpdated a2ps packages fix security vulnerability : Brian M. Carlson reported that a2ps
    last seen2020-06-01
    modified2020-06-02
    plugin id73467
    published2014-04-11
    reporterThis script is Copyright (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/73467
    titleMandriva Linux Security Advisory : a2ps (MDVSA-2014:076)
    code
    #%NASL_MIN_LEVEL 80502
    
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Mandriva Linux Security Advisory MDVSA-2014:076. 
    # The text itself is copyright (C) Mandriva S.A.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(73467);
      script_version("1.4");
      script_cvs_date("Date: 2019/08/02 13:32:55");
    
      script_cve_id("CVE-2014-0466");
      script_bugtraq_id(66660);
      script_xref(name:"MDVSA", value:"2014:076");
    
      script_name(english:"Mandriva Linux Security Advisory : a2ps (MDVSA-2014:076)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Mandriva Linux host is missing one or more security
    updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated a2ps packages fix security vulnerability :
    
    Brian M. Carlson reported that a2ps's fixps script does not invoke gs
    with the -dSAFER option. Consequently executing fixps on a malicious
    PostScript file could result in files being deleted or arbitrary
    commands being executed with the privileges of the user running fixps
    (CVE-2014-0466)."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://advisories.mageia.org/MGASA-2014-0161.html"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Update the affected a2ps, a2ps-devel and / or a2ps-static-devel
    packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:ND");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:a2ps");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:a2ps-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:a2ps-static-devel");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:mandriva:business_server:1");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2014/04/10");
      script_set_attribute(attribute:"plugin_publication_date", value:"2014/04/11");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Mandriva Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/Mandrake/release", "Host/Mandrake/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);
    if (!get_kb_item("Host/Mandrake/release")) audit(AUDIT_OS_NOT, "Mandriva / Mandake Linux");
    if (!get_kb_item("Host/Mandrake/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if (cpu !~ "^(amd64|i[3-6]86|x86_64)$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Mandriva / Mandrake Linux", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"a2ps-4.14-13.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"a2ps-devel-4.14-13.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"a2ps-static-devel-4.14-13.1.mbs1")) 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 familySuSE Local Security Checks
    NASL idOPENSUSE-2014-279.NASL
    descriptiona2ps was updated to fix a security issue : fixps called ghostscript without -dSAFER, enabling postscript files processed by fixps to execute code on the system. (CVE-2014-0466)
    last seen2020-06-05
    modified2014-06-13
    plugin id75316
    published2014-06-13
    reporterThis script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/75316
    titleopenSUSE Security Update : a2ps (openSUSE-SU-2014:0499-1)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_A2PS-140331.NASL
    descriptionThe text to postscript converter a2ps received a security update. The fixps script did not call ghostscript with the -DSAFER option, allowing command execution by attacker supplied postscript files.
    last seen2020-06-05
    modified2014-04-30
    plugin id73783
    published2014-04-30
    reporterThis script is Copyright (C) 2014-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/73783
    titleSuSE 11.3 Security Update : a2ps (SAT Patch Number 9064)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2014-4691.NASL
    descriptionThis update fixes a security problem in the fixps utility (CVE-2014-0466). 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-03-17
    modified2014-05-09
    plugin id73926
    published2014-05-09
    reporterThis script is Copyright (C) 2014-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/73926
    titleFedora 20 : a2ps-4.14-23.fc20 (2014-4691)

Seebug

bulletinFamilyexploit
descriptionBugtraq ID:66660 CVE ID:CVE-2014-0466 GNU a2ps是将文件转换为PostScript的过滤器。 a2ps 4.14内的fixps脚本在执行gs时,没有使用-dSAFER选项,这可使上下文独立的攻击者通过特制的PostScript文件,利用此漏洞执行任意命令。 0 GNU a2ps 4.14 目前厂商已经发布了升级补丁以修复漏洞,请下载使用: http://www.gnu.org/software/a2ps/
idSSV:62158
last seen2017-11-19
modified2014-04-14
published2014-04-14
reporterRoot
titleGNU a2ps任意命令执行漏洞