Skip to content
Heist/ feed
Back to feed
High

Serendipity: Host Header Injection leads to SMTP header injection via unvalidated HTTP_HOST

Type: advisorySources: OSV

Serendipity is a PHP-powered weblog engine. In versions 2.6-beta2 and below, the email sending functionality in include/functions.inc.php inserts $_SERVER['HTTP_HOST'] directly into the Message-ID SMTP header without validation, and the existing sanitization function serendipity_isResponseClean() is not called on HTTP_HOST before embedding it. An attacker who can control the Host header during an email-triggering action such as comment notifications or subscription emails can inject arbitrary SMTP headers into outgoing emails. This enables identity spoofing, reply hijacking via manipulated Message-ID threading, and email reputation abuse through the attacker's domain being embedded in legitimate mail headers. This issue has been fixed in version 2.6.0.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-39971
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 12:50 UTC · Revision 1

Source evidence

Serendipity: Host Header Injection leads to SMTP header injection via unvalidated HTTP_HOST

core-osv · Original source

Published 14 Apr 2026, 23:35 UTC

Serendipity is a PHP-powered weblog engine. In versions 2.6-beta2 and below, the email sending functionality in include/functions.inc.php inserts $_SERVER['HTTP_HOST'] directly into the Message-ID SMTP header without validation, and the existing sanitization function serendipity_isResponseClean() is not called on HTTP_HOST before embedding it. An attacker who can control the Host header during an email-triggering action such as comment notifications or subscription emails can inject arbitrary SMTP headers into outgoing emails. This enables identity spoofing, reply hijacking via manipulated Message-ID threading, and email reputation abuse through the attacker's domain being embedded in legitimate mail headers. This issue has been fixed in version 2.6.0.

osv:CVE-2026-39971
Complete source record
{
  "id": "159ba2d05ef5a7ac2be8ec83cd70ef873da3826003333202f92123072d319354",
  "url": "https://osv.dev/vulnerability/CVE-2026-39971",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Serendipity: Host Header Injection leads to SMTP header injection via unvalidated HTTP_HOST",
    "summary": "Serendipity is a PHP-powered weblog engine. In versions 2.6-beta2 and below, the email sending functionality in include/functions.inc.php inserts $_SERVER['HTTP_HOST'] directly into the Message-ID SMTP header without validation, and the existing sanitization function serendipity_isResponseClean() is not called on HTTP_HOST before embedding it. An attacker who can control the Host header during an email-triggering action such as comment notifications or subscription emails can inject arbitrary SMTP headers into outgoing emails. This enables identity spoofing, reply hijacking via manipulated Message-ID threading, and email reputation abuse through the attacker's domain being embedded in legitimate mail headers. This issue has been fixed in version 2.6.0.",
    "evidence": "osv:CVE-2026-39971",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-39971",
      "aliases": [
        "CVE-2026-39971",
        "GHSA-458g-q4fh-mj6r"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/s9y/serendipity",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "87696c92730d75785d17b515125be3862cdfb49e"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.6.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "87696c92730d75785d17b515125be3862cdfb49e"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "2.6.0"
                  },
                  {
                    "cpe": "cpe:2.3:a:s9y:serendipity:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.6.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.6-beta1",
            "2.5.0",
            "2.5-beta1",
            "2.4.0",
            "2.4-beta1",
            "2.3.0",
            "2.3-rc1",
            "2.3-beta1",
            "2.2.1-alpha1",
            "2.1.1",
            "2.1.0",
            "2.1-rc1",
            "2.1-beta3",
            "2.1-beta2",
            "2.1-beta1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-39971.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:50.735311279Z",
      "provider": "osv",
      "references": [
        "https://github.com/s9y/Serendipity/releases/tag/2.6.0",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/39xxx/CVE-2026-39971.json",
        "https://github.com/s9y/Serendipity/security/advisories/GHSA-458g-q4fh-mj6r",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-39971"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-113"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/39xxx/CVE-2026-39971.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-39971",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 519341,
  "published_at": "2026-04-14T23:35:49.305+00:00"
}