CVE-2026-5987 Code injection in PublicCMS

Medium 5.1 Published Updated

Remote attackers can execute arbitrary code via template injection in PublicCMS FreeMarker handler, requiring immediate attention due to public exploit availability.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-5987?

CVE-2026-5987 is a medium-severity code injection vulnerability in Sanluan PublicCMS, published on 9 Apr 2026. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

A security vulnerability has been detected in Sanluan PublicCMS up to 6.202506.d. This affects the function AbstractFreemarkerView.doRender of the file publiccms-parent/publiccms-core/src/main/java/com/publiccms/common/base/AbstractFreemarkerView.java of the component FreeMarker Template Handler. Such manipulation leads to improper neutralization of special elements used in a template engine. It is possible to launch the attack remotely. The exploit has been disclosed publicly and may be used. The project was informed of the problem early through an issue report but has not responded yet.

Weakness: CWE-791, CWE-1336

Which versions are affected by CVE-2026-5987?

How do I fix CVE-2026-5987?

No fix has been published for CVE-2026-5987 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-5987 being exploited?

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

Sources

Also known as GHSA-v5c9-pmxr-9vhc.

Is CVE-2026-5987 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free