CWE-433 未加解析的原始Web内容分发

admin 2021年12月12日05:46:52评论67 views字数 1025阅读3分25秒阅读模式

CWE-433 未加解析的原始Web内容分发

Unparsed Raw Web Content Delivery

结构: Simple

Abstraction: Variant

状态: Incomplete

被利用可能性: unkown

基本描述

The software stores raw content or supporting code under the web document root with an extension that is not specifically handled by the server.

扩展描述

If code is stored in a file with an extension such as ".inc" or ".pl", and the web server does not have a handler for that extension, then the server will likely send the contents of the file directly to the requester without the pre-processing that was expected. When that file contains sensitive information such as database credentials, this may allow the attacker to compromise the application or associated components.

相关缺陷

  • cwe_Nature: ChildOf cwe_CWE_ID: 219 cwe_View_ID: 1000 cwe_Ordinal: Primary

适用平台

Language: {'cwe_Class': 'Language-Independent', 'cwe_Prevalence': 'Undetermined'}

常见的影响

范围 影响 注释
Confidentiality Read Application Data

可能的缓解方案

Architecture and Design

策略:

Perform a type check before interpreting files.

Architecture and Design

策略:

Do not store sensitive information in files which may be misinterpreted.

示例代码

The following code uses an include file to store database credentials:

database.inc

bad PHP

$dbName = 'usersDB';
$dbPassword = 'skjdh#67nkjd3$3$';
?>

login.php

bad PHP

include('database.inc');
$db = connectToDB($dbName, $dbPassword);
$db.authenticateUser($username, $password);
?>

If the server does not have an explicit handler set for .inc files it may send the contents of database.inc to an attacker without pre-processing, if the attacker requests the file directly. This will expose the database name and password.

分析过的案例

标识 说明 链接
CVE-2002-1886 ".inc" file stored under web document root and returned unparsed by the server https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-1886
CVE-2002-2065 ".inc" file stored under web document root and returned unparsed by the server https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-2065
CVE-2005-2029 ".inc" file stored under web document root and returned unparsed by the server https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-2029
CVE-2001-0330 direct request to .pl file leaves it unparsed https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0330
CVE-2002-0614 .inc file https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-0614
CVE-2004-2353 unparsed config.conf file https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-2353
CVE-2007-3365 Chain: uppercase file extensions causes web server to return script source code instead of executing the script. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-3365

Notes

分类映射

映射的分类名 ImNode ID Fit Mapped Node Name
PLOVER Unparsed Raw Web Content Delivery

引用

文章来源于互联网:scap中文网

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年12月12日05:46:52
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   CWE-433 未加解析的原始Web内容分发https://cn-sec.com/archives/613273.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息