Vulnerabilities > CVE-2009-1704 - Code Injection vulnerability in Apple Safari

047910
CVSS 9.3 - CRITICAL
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
apple
CWE-94
critical
nessus

Summary

CFNetwork in Apple Safari before 4.0 misinterprets downloaded image files as local HTML documents in unspecified circumstances, which allows remote attackers to execute arbitrary JavaScript code by placing it in an image file.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • 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 User-Controlled Variables
    This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An attacker can override environment variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the attacker can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.

Nessus

  • NASL familyWindows
    NASL idSAFARI_4.0.NASL
    descriptionThe version of Safari installed on the remote Windows host is earlier than 4.0. It therefore is potentially affected by numerous issues in the following components : - CFNetwork - CoreGraphics - ImageIO - International Components for Unicode - libxml - Safari - Safari Windows Installer - WebKit
    last seen2020-06-01
    modified2020-06-02
    plugin id39339
    published2009-06-09
    reporterThis script is Copyright (C) 2009-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/39339
    titleSafari < 4.0 Multiple Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    include("compat.inc");
    
    
    if (description)
    {
      script_id(39339);
      script_version("1.30");
      script_cvs_date("Date: 2018/07/27 18:38:15");
    
      script_cve_id("CVE-2006-2783", "CVE-2008-1588", "CVE-2008-2320", "CVE-2008-2321",
                    "CVE-2008-3281", "CVE-2008-3529", "CVE-2008-3632", "CVE-2008-4225",
                    "CVE-2008-4226", "CVE-2008-4231", "CVE-2008-4409", "CVE-2009-0040",
                    "CVE-2009-0145", "CVE-2009-0153", "CVE-2009-0946", "CVE-2009-1179",
                    "CVE-2009-1681", "CVE-2009-1682", "CVE-2009-1684", "CVE-2009-1685",
                    "CVE-2009-1686", "CVE-2009-1687", "CVE-2009-1688", "CVE-2009-1689",
                    "CVE-2009-1690", "CVE-2009-1691", "CVE-2009-1693", "CVE-2009-1694",
                    "CVE-2009-1695", "CVE-2009-1696", "CVE-2009-1697", "CVE-2009-1698",
                    "CVE-2009-1699", "CVE-2009-1700", "CVE-2009-1701", "CVE-2009-1702",
                    "CVE-2009-1703", "CVE-2009-1704", "CVE-2009-1705", "CVE-2009-1706",
                    "CVE-2009-1707", "CVE-2009-1708", "CVE-2009-1709", "CVE-2009-1710",
                    "CVE-2009-1711", "CVE-2009-1712", "CVE-2009-1713", "CVE-2009-1714",
                    "CVE-2009-1715", "CVE-2009-1716", "CVE-2009-1718", "CVE-2009-2027",
                    "CVE-2009-2420", "CVE-2009-2421");
      script_bugtraq_id(30487, 31092, 32326, 33276, 35260, 35270, 35271, 35272, 35283,
                        35284, 35308, 35309, 35310, 35311, 35315, 35317, 35318, 35319,
                        35320, 35321, 35322, 35325, 35327, 35328, 35330, 35331, 35332,
                        35333, 35334, 35339, 35340, 35344, 35346, 35347, 35348, 35349,
                        35350, 35351, 35352, 35353, 35481, 35482);
    
      script_name(english:"Safari < 4.0 Multiple Vulnerabilities");
      script_summary(english:"Checks Safari's version number");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote host contains a web browser that is affected by several
    vulnerabilities.");
      script_set_attribute(attribute:"description", value:
    "The version of Safari installed on the remote Windows host is earlier
    than 4.0.  It therefore is potentially affected by numerous issues in
    the following components :
    
      - CFNetwork
      - CoreGraphics
      - ImageIO
      - International Components for Unicode
      - libxml
      - Safari
      - Safari Windows Installer
      - WebKit");
      script_set_attribute(attribute:"see_also", value:"http://support.apple.com/kb/HT3613");
      script_set_attribute(attribute:"see_also", value:"http://lists.apple.com/archives/security-announce/2009/Jun/msg00002.html");
      script_set_attribute(attribute:"see_also", value:"http://www.securityfocus.com/advisories/17079");
      script_set_attribute(attribute:"solution", value:"Upgrade to Safari 4.0 or later.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
      script_set_attribute(attribute:"canvas_package", value:'CANVAS');
      script_cwe_id(20, 79, 94, 119, 189, 200, 255, 264, 310, 362, 399);
    
      script_set_attribute(attribute:"plugin_publication_date", value:"2009/06/09");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:apple:safari");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Windows");
    
      script_copyright(english:"This script is Copyright (C) 2009-2018 Tenable Network Security, Inc.");
    
      script_dependencies("safari_installed.nasl");
      script_require_keys("SMB/Safari/FileVersion");
    
      exit(0);
    }
    
    
    include("global_settings.inc");
    
    
    path = get_kb_item("SMB/Safari/Path");
    version = get_kb_item("SMB/Safari/FileVersion");
    if (isnull(version)) exit(0);
    
    ver = split(version, sep:'.', keep:FALSE);
    for (i=0; i<max_index(ver); i++)
      ver[i] = int(ver[i]);
    
    if (
      ver[0] < 4 ||
      (
        ver[0] == 4 &&
        (
          ver[1] < 530 ||
          (ver[1] == 530 && ver[2] < 17)
        )
      )
    )
    {
      if (report_verbosity > 0)
      {
        if (isnull(path)) path = "n/a";
    
        prod_version = get_kb_item("SMB/Safari/ProductVersion");
        if (!isnull(prod_version)) version = prod_version;
    
        report = string(
          "\n",
          "Nessus collected the following information about the current install\n",
          "of Safari on the remote host :\n",
          "\n",
          "  Version : ", version, "\n",
          "  Path    : ", path, "\n"
        );
        security_hole(port:get_kb_item("SMB/transport"), extra:report);
      }
      else security_hole(get_kb_item("SMB/transport"));
    }
    
  • NASL familyMacOS X Local Security Checks
    NASL idMACOSX_SAFARI4_0.NASL
    descriptionThe version of Apple Safari installed on the remote Mac OS X host is earlier than 4.0. As such, it is potentially affected by numerous issues in the following components : - CFNetwork - libxml - Safari - WebKit
    last seen2020-06-01
    modified2020-06-02
    plugin id39338
    published2009-06-09
    reporterThis script is Copyright (C) 2009-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/39338
    titleMac OS X : Apple Safari < 4.0

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 35260 CVE(CAN) ID: CVE-2009-1718,CVE-2009-1715,CVE-2009-1714,CVE-2009-1713,CVE-2009-1712,CVE-2009-1711,CVE-2009-1710,CVE-2009-1709,CVE-2009-1703,CVE-2009-1702,CVE-2009-1701,CVE-2009-1700,CVE-2009-1699,CVE-2009-1698,CVE-2009-1697,CVE-2009-1696,CVE-2009-1695,CVE-2009-1694,CVE-2009-1693,CVE-2009-1691,CVE-2009-1690,CVE-2009-1689,CVE-2009-1688,CVE-2009-1687,CVE-2009-1686,CVE-2009-1685,CVE-2009-1684,CVE-2009-1681,CVE-2009-1708,CVE-2009-1707,CVE-2009-1706,CVE-2009-1682,CVE-2009-1705,CVE-2009-1716,CVE-2009-1704 Safari是苹果家族机器操作系统中默认捆绑的WEB浏览器。 远程攻击者可以利用Safari浏览器中的多个内存破坏和设计错误导致拒绝服务、执行任意代码或执行网络钓鱼攻击。 CVE-2009-1704 safe类型的文件在下载后未经警告用户便会由Safari显示。Safari中的漏洞可能导致无法确认某些本地图形文件的文件类型。在这种情况下,Safari会检查这些文件的内容并可能将其处理为HTML。如果文件包含有JavaScript,就会在本地安全环境中执行。对于下载的文件,不应未经提示用户便执行。 CVE-2009-1716 CFNetwork在下载时以不安全方式创建临时文件,本地用户可以在下载时访问其他用户的文件,导致泄漏敏感信息。 CVE-2009-1705 处理TrueType字体时存在内存破坏漏洞,自动提示字体时的算术错误可能触发内存破坏。 CVE-2009-1682 Safari处理EV证书时的错误可能导致绕过撤销检查,这可能允许未经发布已撤销EV证书警告便加载页面。 CVE-2009-1706 Safari的Private Browsing功能允许用户在进行浏览时不在磁盘上留下浏览器会话的证据。该功能中的实现漏洞可能导致在保密浏览结束后在磁盘上留下Cookie,意外泄漏敏感信息。 CVE-2009-1707 在“重置Safari...”菜单选项中点击了“重置保存的名称和口令”的“重置”键后,Safari可能需要30秒钟才能清除口令。在这个时间窗口访问了系统的用户可以访问储存的凭据。 CVE-2009-1708 Safari的open-help-anchor URL处理器可能允许恶意网站打开本地帮助文件,导致泄漏敏感信息或执行任意代码。 CVE-2009-1681 用于限制网站间交互的同源策略机制中存在设计问题,该策略允许网站将第三方网站的网页加载到子帧,这个帧可能导致点击劫持攻击。 CVE-2009-1684 JavaScript环境隔离中存在跨站脚本漏洞,恶意网页可能使用事件处理器在其窗口或帧所加载的下一个网页的安全环境中执行脚本。 CVE-2009-1685 JavaScript环境隔离中存在跨站脚本漏洞,用户受骗访问了恶意站点就会导致覆盖不同安全区所提供的嵌入式或父文档的document.implementation。 CVE-2009-1686 WebKit的JavaScript异常处理中存在类型转换问题。在尝试对声明为常量的变量分配异常时,对象会被赋值为无效类型,导致内存破坏。 CVE-2009-1687 WebKit的JavaScript垃圾收集器中存在内存破坏。如果分配失败,可能出现对空指针偏移的写操作,导致应用程序意外终止或执行任意代码。 CVE-2009-1688 WebKit没有使用HTML 5标准方法确定指定脚本相关的安全环境,WebKit方法中的实现问题在某些条件下可能导致跨站脚本攻击。 CVE-2009-1689 WebKit中存在跨站脚本漏洞,包含有提交给about:blank表单的恶意网站可以同步替换文档的安全环境,导致在新的安全环境中运行正在执行的脚本。 CVE-2009-1690 WebKit处理某些DOM事件处理器中的递归时存在内存破坏,访问恶意网站可能导致应用程序意外终止或执行任意代码。 CVE-2009-1691 Safari中的跨站脚本漏洞允许恶意网站更改不同域所提供网站的标准JavaScript原型。如果用户受骗访问了恶意网页,攻击者就可以更改其他网站所提供的 JavaScript的执行。 CVE-2009-1693 WebKit中存在跨站图形抓取漏洞,恶意网站可以使用带有SVG图形的画布加载并抓取其他网站的图形。 CVE-2009-1694 WebKit中存在跨站图形抓取漏洞,恶意网站可以使用画布和重新定向加载并抓取其他网站的图形。 CVE-2009-1695 WebKit允许HTML文档在页面过渡之后访问帧的内容,这可能允许恶意网站执行跨站脚本攻击。 CVE-2009-1696 Safari使用可预测的算法为JavaScript应用生成随机数,这可能允许网站无需使用cookie、隐藏表单元素、IP地址等技术便可追踪特定的Safari会话。 CVE-2009-1697 在处理WebKit的XMLHttpRequest头时存在CRLF注入漏洞,可能允许恶意网站通过发布缺少Host头的XMLHttpRequest绕过同源策略。缺少Host头的XMLHttpRequest可能到达同一服务 器上的其他网站,允许攻击者所提供的JavaScript与这些网站交互。 CVE-2009-1698 处理CSS attr函数时存在未初始化的指针漏洞,查看恶意网页可能导致应用程序意外终止或执行任意代码。 CVE-2009-1699 WebKit处理XML时存在XML外部实体漏洞,恶意汪涵可以从用户系统读取文件。 CVE-2009-1700 WebKit在处理XSLT时没有正确的处理重新定向,这可能允许恶意网站从其他网站的页面检索XML内容,导致泄漏敏感信息。 CVE-2009-1701 WebKit处理JavaScript DOM时存在释放后使用漏洞,访问恶意网站可能导致应用程序意外终止或执行任意代码。 CVE-2009-1702 WebKit处理位置和历史对象时存在漏洞,访问恶意网站可能导致跨站脚本攻击。 CVE-2009-1703 WebKit处理音频和视频HTML元素可能允许远程网站引用本地file: URL,恶意网站可以检查文件是否存在。 CVE-2009-1709 WebKit处理SVG动画元素时存在释放后使用漏洞,访问恶意站点可能导致应用程序意外终止或执行任意代码。 CVE-2009-1710 恶意网站可以通过指定很大的几乎透明的自定义光标并调整CSS3热点属性来伪造浏览器UI元素,如主机名和安全指示符。 CVE-2009-1711 WebKit处理Attr DOM对象时存在未初始化内存访问漏洞,访问恶意站点可能导致应用程序意外终止或执行任意代码。 CVE-2009-1712 WebKit允许远程网站加载本地系统的Java applet。本地applet不应远程加载,可能允许远程站点执行任意代码或许可非预期的权限。 CVE-2009-1713 WebKit在实现XSLT文档中所使用的document()函数时存在信息泄露漏洞,恶意站点可以读取其他安全区中的文件。 CVE-2009-1714 Web Inspector中的漏洞允许正在检查的页面以提升的权限运行注入的脚本,包括读取用户的文件系统。 CVE-2009-1715 Web Inspector中的漏洞允许正在检查的页面以提升的权限运行注入的脚本,包括读取用户的文件系统。 CVE-2009-1718 WebKit处理拖放事件中的漏洞可能导致在从恶意网页拖放内容时泄露敏感信息。 Apple Safari &lt; 4.0 厂商补丁: Apple ----- 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: <a href="http://www.apple.com/safari/download/" target="_blank" rel=external nofollow>http://www.apple.com/safari/download/</a>
idSSV:11574
last seen2017-11-19
modified2009-06-11
published2009-06-11
reporterRoot
titleApple Safari 4.0多个安全漏洞