<dd id="sga4y"><optgroup id="sga4y"></optgroup></dd>
<nav id="sga4y"><code id="sga4y"></code></nav>
  • <optgroup id="sga4y"></optgroup>

    Possible Variable Overwrite: Global Scope

    ABSTRACT

    此程序會調用可覆蓋全局變量的函數,這可能會為攻擊者打開方便之門。

    EXPLANATION

    對于可覆蓋已初始化的全局變量的函數,攻擊者能夠通過它影響依賴被覆蓋變量的代碼的執行情況。
    行的 函數可覆蓋全局變量。

    例 1:如果攻擊者為下面這段 PHP 代碼中的 str 提供惡意值,則對 mb_parse_str() 的調用可能會覆蓋所有任意值,包括 first。在這種情況下,如果包含 JavaScript 的惡意值覆蓋 first,則該程序會很容易受到 cross-site scripting 攻擊。


    <?php
    $first="User";
    ...
    $str = $_SERVER['QUERY_STRING'];
    mb_parse_str($str);
    echo $first;
    ?>

    REFERENCES

    [1] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 473


    Copyright 2013 Fortify Software - All rights reserved.
    (Generated from version 2013.1.1.0008 of the Fortify Secure Coding Rulepacks)
    desc.dataflow.php.possible_variable_overwrite_global

    97av