ID CVE-2004-0967
Summary The (1) pj-gs.sh, (2) ps2epsi, (3) pv.sh, and (4) sysvlp.sh scripts in the ESP Ghostscript (espgs) package in Trustix Secure Linux 1.5 through 2.1, and other operating systems, allow local users to overwrite files via a symlink attack on temporary files.
References
Vulnerable Configurations
  • cpe:2.3:a:aladdin_enterprises:ghostscript:4.3
    cpe:2.3:a:aladdin_enterprises:ghostscript:4.3
  • cpe:2.3:a:aladdin_enterprises:ghostscript:4.3.2
    cpe:2.3:a:aladdin_enterprises:ghostscript:4.3.2
  • cpe:2.3:a:aladdin_enterprises:ghostscript:5.10.10
    cpe:2.3:a:aladdin_enterprises:ghostscript:5.10.10
  • cpe:2.3:a:aladdin_enterprises:ghostscript:5.10.10:-:mdk
    cpe:2.3:a:aladdin_enterprises:ghostscript:5.10.10:-:mdk
  • cpe:2.3:a:aladdin_enterprises:ghostscript:5.10.10_1
    cpe:2.3:a:aladdin_enterprises:ghostscript:5.10.10_1
  • cpe:2.3:a:aladdin_enterprises:ghostscript:5.10.10_1:-:mdk
    cpe:2.3:a:aladdin_enterprises:ghostscript:5.10.10_1:-:mdk
  • cpe:2.3:a:aladdin_enterprises:ghostscript:5.10.12cl
    cpe:2.3:a:aladdin_enterprises:ghostscript:5.10.12cl
  • cpe:2.3:a:aladdin_enterprises:ghostscript:5.10.15
    cpe:2.3:a:aladdin_enterprises:ghostscript:5.10.15
  • cpe:2.3:a:aladdin_enterprises:ghostscript:5.10.16
    cpe:2.3:a:aladdin_enterprises:ghostscript:5.10.16
  • cpe:2.3:a:aladdin_enterprises:ghostscript:5.10cl
    cpe:2.3:a:aladdin_enterprises:ghostscript:5.10cl
  • cpe:2.3:a:aladdin_enterprises:ghostscript:5.50
    cpe:2.3:a:aladdin_enterprises:ghostscript:5.50
  • cpe:2.3:a:aladdin_enterprises:ghostscript:5.50.8
    cpe:2.3:a:aladdin_enterprises:ghostscript:5.50.8
  • cpe:2.3:a:aladdin_enterprises:ghostscript:5.50.8_7
    cpe:2.3:a:aladdin_enterprises:ghostscript:5.50.8_7
  • cpe:2.3:a:aladdin_enterprises:ghostscript:6.51
    cpe:2.3:a:aladdin_enterprises:ghostscript:6.51
  • cpe:2.3:a:aladdin_enterprises:ghostscript:6.52
    cpe:2.3:a:aladdin_enterprises:ghostscript:6.52
  • cpe:2.3:a:aladdin_enterprises:ghostscript:6.53
    cpe:2.3:a:aladdin_enterprises:ghostscript:6.53
  • cpe:2.3:a:aladdin_enterprises:ghostscript:7.0.4
    cpe:2.3:a:aladdin_enterprises:ghostscript:7.0.4
  • cpe:2.3:a:aladdin_enterprises:ghostscript:7.0.5
    cpe:2.3:a:aladdin_enterprises:ghostscript:7.0.5
  • cpe:2.3:a:aladdin_enterprises:ghostscript:7.0.6
    cpe:2.3:a:aladdin_enterprises:ghostscript:7.0.6
  • cpe:2.3:a:aladdin_enterprises:ghostscript:7.0.7
    cpe:2.3:a:aladdin_enterprises:ghostscript:7.0.7
CVSS
Base: 7.2 (as of 01-01-2004 - 00:00)
Impact:
Exploitability:
CWE CWE-59
CAPEC
  • Symlink Attack
    An attacker positions a symbolic link in such a manner that the targeted user or application accesses the link's endpoint, assuming that it is accessing a file with the link's name. The endpoint file may be either output or input. If the file is output, the result is that the endpoint is modified, instead of a file at the intended location. Modifications to the endpoint file may include appending, overwriting, corrupting, changing permissions, or other modifications. In some variants of this attack the attacker may be able to control the change to a file while in other cases they cannot. The former is especially damaging since the attacker may be able to grant themselves increased privileges or insert false information, but the latter can also be damaging as it can expose sensitive information or corrupt or destroy vital system or application files. Alternatively, the endpoint file may serve as input to the targeted application. This can be used to feed malformed input into the target or to cause the target to process different information, possibly allowing the attacker to control the actions of the target or to cause the target to expose information to the attacker. Moreover, the actions taken on the endpoint file are undertaken with the permissions of the targeted user or application, which may exceed the permissions that the attacker would normally have.
  • 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.
  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
  • Manipulating Input to File System Calls
    An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.
Access
VectorComplexityAuthentication
LOCAL LOW NONE
Impact
ConfidentialityIntegrityAvailability
COMPLETE COMPLETE COMPLETE
nessus via4
  • NASL family Red Hat Local Security Checks
    NASL id REDHAT-RHSA-2005-081.NASL
    description Updated ghostscript packages that fix a PDF output issue and a temporary file security bug are now available. This update has been rated as having low security impact by the Red Hat Security Response Team. Ghostscript is a program for displaying PostScript files or printing them to non-PostScript printers. A bug was found in the way several of Ghostscript's utility scripts created temporary files. A local user could cause these utilities to overwrite files that the victim running the utility has write access to. The Common Vulnerabilities and Exposures project assigned the name CVE-2004-0967 to this issue. Additionally, this update addresses the following issue : A problem has been identified in the PDF output driver, which can cause output to be delayed indefinitely on some systems. The fix has been backported from GhostScript 7.07. All users of ghostscript should upgrade to these updated packages, which contain backported patches to resolve these issues.
    last seen 2019-02-21
    modified 2018-11-15
    plugin id 19827
    published 2005-10-05
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=19827
    title RHEL 3 : ghostscript (RHSA-2005:081)
  • NASL family Ubuntu Local Security Checks
    NASL id UBUNTU_USN-3-1.NASL
    description Recently, Trustix Secure Linux discovered some vulnerabilities in the gs-common package. The utilities 'pv.sh' and 'ps2epsi' created temporary files in an insecure way, which allowed a symlink attack to create or overwrite arbitrary files with the privileges of the user invoking the program. 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 2019-02-21
    modified 2018-07-19
    plugin id 20645
    published 2006-01-15
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=20645
    title Ubuntu 4.10 : GhostScript utility script vulnerabilities (USN-3-1)
  • NASL family CentOS Local Security Checks
    NASL id CENTOS_RHSA-2005-081.NASL
    description Updated ghostscript packages that fix a PDF output issue and a temporary file security bug are now available. This update has been rated as having low security impact by the Red Hat Security Response Team. Ghostscript is a program for displaying PostScript files or printing them to non-PostScript printers. A bug was found in the way several of Ghostscript's utility scripts created temporary files. A local user could cause these utilities to overwrite files that the victim running the utility has write access to. The Common Vulnerabilities and Exposures project assigned the name CVE-2004-0967 to this issue. Additionally, this update addresses the following issue : A problem has been identified in the PDF output driver, which can cause output to be delayed indefinitely on some systems. The fix has been backported from GhostScript 7.07. All users of ghostscript should upgrade to these updated packages, which contain backported patches to resolve these issues.
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 21797
    published 2006-07-03
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=21797
    title CentOS 3 : ghostscript (CESA-2005:081)
  • NASL family Gentoo Local Security Checks
    NASL id GENTOO_GLSA-200410-18.NASL
    description The remote host is affected by the vulnerability described in GLSA-200410-18 (Ghostscript: Insecure temporary file use in multiple scripts) The pj-gs.sh, ps2epsi, pv.sh and sysvlp.sh scripts create temporary files in world-writeable directories with predictable names. Impact : A local attacker could create symbolic links in the temporary files directory, pointing to a valid file somewhere on the filesystem. When an affected script is called, this would result in the file to be overwritten with the rights of the user running the script, which could be the root user. Workaround : There is no known workaround at this time.
    last seen 2019-02-21
    modified 2018-07-11
    plugin id 15527
    published 2004-10-21
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=15527
    title GLSA-200410-18 : Ghostscript: Insecure temporary file use in multiple scripts
  • NASL family FreeBSD Local Security Checks
    NASL id FREEBSD_PKG_27A70A015F6C11DA8D54000CF18BBE54.NASL
    description Ghostscript is affected by an insecure temporary file creation vulnerability. This issue is likely due to a design error that causes the application to fail to verify the existence of a file before writing to it. An attacker may leverage this issue to overwrite arbitrary files with the privileges of an unsuspecting user that activates the vulnerable application. Reportedly this issue is unlikely to facilitate privilege escalation.
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 21404
    published 2006-05-13
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=21404
    title FreeBSD : ghostscript -- insecure temporary file creation vulnerability (27a70a01-5f6c-11da-8d54-000cf18bbe54)
oval via4
accepted 2013-04-29T04:04:18.381-04:00
class vulnerability
contributors
  • name Aharon Chernin
    organization SCAP.com, LLC
  • name Dragos Prisaca
    organization G2, Inc.
definition_extensions
  • comment The operating system installed on the system is Red Hat Enterprise Linux 3
    oval oval:org.mitre.oval:def:11782
  • comment CentOS Linux 3.x
    oval oval:org.mitre.oval:def:16651
description The (1) pj-gs.sh, (2) ps2epsi, (3) pv.sh, and (4) sysvlp.sh scripts in the ESP Ghostscript (espgs) package in Trustix Secure Linux 1.5 through 2.1, and other operating systems, allow local users to overwrite files via a symlink attack on temporary files.
family unix
id oval:org.mitre.oval:def:10284
status accepted
submitted 2010-07-09T03:56:16-04:00
title The (1) pj-gs.sh, (2) ps2epsi, (3) pv.sh, and (4) sysvlp.sh scripts in the ESP Ghostscript (espgs) package in Trustix Secure Linux 1.5 through 2.1, and other operating systems, allow local users to overwrite files via a symlink attack on temporary files.
version 24
redhat via4
advisories
rhsa
id RHSA-2005:081
refmap via4
bid 11285
confirm http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=136321
sco
  • SCOSA-2006.19
  • SCOSA-2006.23
secunia
  • 16997
  • 17135
  • 19799
  • 20056
trustix 2004-0050
ubuntu USN-3-1
xf script-temporary-file-overwrite(17583)
statements via4
contributor Mark J Cox
lastmodified 2007-09-07
organization Red Hat
statement Red Hat is aware of this issue and is tracking it via the following bug: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=140074 The Red Hat Security Response Team has rated this issue as having low security impact, a future update may address this flaw. More information regarding issue severity can be found here: http://www.redhat.com/security/updates/classification/ The risks associated with fixing this bug are greater than the low severity security risk. We therefore currently have no plans to fix this flaw in Red Hat Enterprise Linux 2.1 which is in maintenance mode.
Last major update 07-12-2016 - 21:59
Published 09-02-2005 - 00:00
Last modified 10-10-2017 - 21:29
Back to Top