# CVE-2026-39971: Serendipity: Host Header Injection leads to SMTP header injection via unvalidated HTTP_HOST

> Attackers can inject SMTP headers via Host header manipulation in Serendipity, enabling email spoofing and reply hijacking.

- **Severity:** High 7.2 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Apr 2026
- **Updated:** 15 Apr 2026
- **Also known as:** GHSA-458g-q4fh-mj6r

## What is CVE-2026-39971?

CVE-2026-39971 is a high-severity vulnerability in S9y Serendipity, published on 14 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-113 (Improper Neutralization of CRLF Sequences in HTTP Headers)

## Which versions are affected by CVE-2026-39971?

2 open source packages ship an affected version, including s9y/serendipity. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `s9y/serendipity` | Packagist | All versions | 2.6.0 |
| `s9y/serendipity` | Packagist | All versions | 2.6.0 |

Products: S9y Serendipity.

## How do I fix CVE-2026-39971?

Upgrade s9y/serendipity to 2.6.0 or later.

## Is CVE-2026-39971 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-39971 exists.

## Other vulnerabilities in S9y Serendipity

- [CVE-2005-1449](https://insights.sbomify.com/CVE-2005-1449/): Other in n/a (critical 10.0)
- [CVE-2005-1452](https://insights.sbomify.com/CVE-2005-1452/): Missing authorization in n/a (critical 10.0)
- [CVE-2020-10964](https://insights.sbomify.com/CVE-2020-10964/): File upload in n/a (critical 9.8)
- [CVE-2011-1134](https://insights.sbomify.com/CVE-2011-1134/): Cross-site scripting in n/a (critical 9.8)
- [CVE-2016-10752](https://insights.sbomify.com/CVE-2016-10752/): File upload in n/a (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-39971 and fix it if it is affected.

What it is: CVE-2026-39971 is a high-severity vulnerability in S9y Serendipity, published on 14 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-39971 exists.

Affected packages and fixed versions:
- s9y/serendipity (Packagist): affected all versions; fixed in 2.6.0
- s9y/serendipity (Packagist): affected all versions; fixed in 2.6.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-39971/ (Markdown: https://insights.sbomify.com/CVE-2026-39971/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-39971
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-39971
- OSV: https://osv.dev/vulnerability/CVE-2026-39971

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-39971/
Summaries are generated and may contain mistakes; the official description above is the record.
