CVE-2024-58303: Fof/pretty mail FoF Pretty Mail Has A Vulnerability
HIGHCVE-2024-58303 is a HIGH fof pretty mail has a vulnerability (CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine) affecting Fof/pretty mail libraries in the Packagist ecosystem. The issue involves fof pretty mail has a server-side template injection vulnerability. Remediation is available in the latest vendor maintenance releases.
CVE-2024-58303 at a Glance
How to Fix CVE-2024-58303
To remediate this vulnerability, upgrade all affected Fof/pretty mail dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade fof/pretty-mail to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for fof/pretty-mail
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-58303, inspect your project dependencies for Fof/pretty mail:
inspect dependencies for fof/pretty-mail
Analyze the terminal output to locate any version of Fof/pretty mail in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine, where the product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine. In Fof/pretty mail, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-58303 Affected Fof/pretty mail Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
fof/pretty-mail
|
Packagist |
≤ 1.1.2
|
|
References
Frequently Asked Questions
What is CVE-2024-58303?
Which Fof/pretty mail versions are affected?
What version fixes CVE-2024-58303?
Is fof/pretty-mail affected?
What CWE is associated with CVE-2024-58303?
How can I check Packagist dependencies for CVE-2024-58303?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-947q-2xw3-gx9c",
"modified" : "2025-12-12T16:39:20Z",
"published" : "2025-12-12T00:30:21Z",
"aliases" : [ "CVE-2024-58303" ],
"summary" : "FoF Pretty Mail has a server-side template injection vulnerability",
"details" : "FoF Pretty Mail 1.1.2 contains a server-side template injection vulnerability that allows administrative users to inject malicious code into email templates. Attackers can execute system commands by inserting crafted template expressions that trigger arbitrary code execution during email generation.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "fof/pretty-mail"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.1.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-58303"
}, {
"type" : "WEB",
"url" : "https://flarum.org"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/FriendsOfFlarum/pretty-mail"
}, {
"type" : "WEB",
"url" : "https://www.exploit-db.com/exploits/51948"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/fof-pretty-mail-server-side-template-injection-via-email-template-settings"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1336" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-12T16:39:19Z",
"nvd_published_at" : "2025-12-11T22:15:51Z"
}
}