VYPR
Unrated severityNVD Advisory· Published Mar 28, 2007· Updated Apr 23, 2026

CVE-2007-1718

CVE-2007-1718

Description

CRLF injection vulnerability in the mail function in PHP 4.0.0 through 4.4.6 and 5.0.0 through 5.2.1 allows remote attackers to inject arbitrary e-mail headers and possibly conduct spam attacks via a control character immediately following folding of the (1) Subject or (2) To parameter, as demonstrated by a parameter containing a "\r\n\t\n" sequence, related to an increment bug in the SKIP_LONG_HEADER_SEP macro.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

PHP 4.0.0 through 4.4.6 and 5.0.0 through 5.2.1 allow CRLF injection in the mail() function via crafted Subject or To headers, enabling arbitrary header injection and spam.

Vulnerability

CVE-2007-1718 is a CRLF injection vulnerability in the mail() function in PHP versions 4.0.0 through 4.4.6 and 5.0.0 through 5.2.1. The flaw allows an attacker to inject arbitrary email headers by providing a control character sequence (e.g., "\r\n\t\n") immediately following folding in the Subject or To parameter. This is related to an increment bug in the SKIP_LONG_HEADER_SEP macro in PHP's source code [1].

Exploitation

An attacker can exploit this vulnerability by crafting a Subject or To string submitted to a PHP script that uses the mail() function with user-supplied header data. No authentication or special network position is required if the script is exposed to remote input. The attacker injects \r\n sequences to break out of the header and add additional headers or even content to the email body [1][2].

Impact

Successful exploitation allows a remote attacker to inject arbitrary email headers, potentially leading to the sending of bulk spam email from the affected server. This can result in abuse of email infrastructure, reputational damage, and resource consumption. The vulnerability does not directly lead to remote code execution or data disclosure [1][3].

Mitigation

Red Hat released an update to PHP packages for Red Hat Enterprise Linux 3 and 4 to address CVE-2007-1718, available in RHSA-2007-0155 [1]. Other vendors presumably issued similar patches. Users should upgrade to PHP versions containing the fix (e.g., 4.4.7 or 5.2.2 or later). If patching is not immediately possible, avoid using user-supplied input in Subject or To headers of emails sent via the PHP mail() function [4].

AI Insight generated on May 24, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

76
  • PHP/PHP75 versions
    cpe:2.3:a:php:php:4.0:*:*:*:*:*:*:*+ 74 more
    • cpe:2.3:a:php:php:4.0:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0.0:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0.1:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0.1:patch1:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0.1:patch2:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0.2:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0.3:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0.3:patch1:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0.4:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0.4:patch1:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0.5:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0.6:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0.7:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0.7:rc1:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0.7:rc2:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0.7:rc3:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0:beta1:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0:beta2:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0:beta3:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0:beta4:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0:beta_4_patch1:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0:rc1:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.0:rc2:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.1.0:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.1.1:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.1.2:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.2.0:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.2.1:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.2.2:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.2.3:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.2:*:dev:*:*:*:*:*
    • cpe:2.3:a:php:php:4.3.0:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.3.1:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.3.10:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.3.11:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.3.2:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.3.3:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.3.4:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.3.5:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.3.6:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.3.7:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.3.8:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.3.9:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.4.0:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.4.1:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.4.2:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.4.3:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.4.4:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.4.5:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:4.4.6:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.0.0:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.0.0:beta1:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.0.0:beta2:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.0.0:beta3:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.0.0:beta4:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.0.0:rc1:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.0.0:rc2:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.0.0:rc3:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.0.1:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.0.2:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.0.3:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.0.4:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.0.5:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.0:rc1:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.0:rc2:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.0:rc3:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.1.0:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.1.1:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.1.2:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.1.3:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.1.4:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.1.5:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.1.6:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.2.0:*:*:*:*:*:*:*
    • cpe:2.3:a:php:php:5.2.1:*:*:*:*:*:*:*
  • Range: 4.0.0 - 4.4.6, 5.0.0 - 5.2.1

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

26

News mentions

0

No linked articles in our index yet.