WordPress自定义字段任意文件上传漏洞

admin 2022-07-23 03:42:24 CNNVD漏洞 来源:ZONE.CI 全球网 0 阅读模式

漏洞信息详情

WordPress自定义字段任意文件上传漏洞

  • CNNVD编号:CNNVD-200707-044
  • 危害等级: 低危
  • CVE编号: CVE-2007-3543
  • 漏洞类型: 访问验证错误
  • 发布时间: 2007-06-26
  • 威胁类型: 远程
  • 更新时间: 2007-07-05
  • 厂        商: wordpress
  • 漏洞来源: Alexander Concha※ ...

漏洞简介

\"WordPress是一款免费的论坛Blog系统。 WordPress处理用户提交的数据时存在漏洞,远程攻击者可能利用此漏洞非授权操作文件。 WordPress允许上传有限的文件附件组,其中名称、标题等以post_type=attachment存储到了wp_posts表中,而路径和其他文件属性以名为_wp_attached_file和_wp_attachment_metadata的特殊字段被存储到了wp_postmeta表中。 WordPress还允许在正常的张贴或页面中添加自定义字段,该自定义字段也被存储到了wp_postmeta表中,但没有检查正常的张贴中是否添加了附件的这个特殊的meta-data字段。 wp-app.php中的以下函数允许上传任意文件: function put_file($postID) { $type = $this->get_accepted_content_type(); // first check if user can upload if(!current_user_can(\'\'upload_files\'\')) $this->auth_required(__(\'\'You do not have permission to upload files.\'\')); // check for not found global $entry; $this->set_current_entry($postID); // then whether user can edit the specific post if(!current_user_can(\'\'edit_post\'\', $postID)) { $this->auth_required(__(\'\'Sorry, you do not have the right to edit this post.\'\')); } $location = get_post_meta($entry[\'\'ID\'\'], \'\'_wp_attached_file\'\', true); if(!isset($location)) $this->internal_error(__(\'\'Error ocurred while accessing post metadata for file location.\'\')); $fp = fopen(\"php://input\", \"rb\"); $localfp = fopen($location, \"w+\"); while(!feof($fp)) { fwrite($localfp,fread($fp, 4096)); } fclose($fp); fclose($localfp); log_app(\'\'function\'\',\"put_file($postID)\"); $this->ok(); } 这个函数主要用于加载第一个附件的路径,并写入张贴到wp-app.php的内容,因此如果攻击者能够用合适的文件名覆盖第一个元数据附件的值,就会向该文件写入所有的内容。\"

漏洞公告

目前厂商已经发布了升级补丁以修复这个安全问题,补丁下载链接: http://trac.mu.wordpress.org/changeset/1005

参考网址

来源: BID 名称: 24642 链接:http://www.securityfocus.com/bid/24642 来源: MISC 链接:http://www.buayacorp.com/files/wordpress/wordpress-advisory.HTML 来源: trac.mu.wordpress.org 链接:http://trac.mu.wordpress.org/changeset/1005 来源: SECUNIA 名称: 25794 链接:http://secunia.com/advisories/25794 来源: OSVDB 名称: 37295 链接:http://osvdb.org/37295

受影响实体

  • Wordpress Wordpress:2.2.0  
  • Wordpress Wordpress_mu:1.2.2  

补丁

    暂无

weinxin
特别声明
本站(ZONE.CI)所有文章仅供技术研究,若将其信息做其他用途,由用户承担全部法律及连带责任,本站不承担任何法律及连带责任,请遵守中华人民共和国安全法.
评论:0   参与:  0