Servers and applications
GHSA-966m-5mq6-5q48
{html_options}, {html_select_date} and {html_select_time} emit six named parameters into attribute values and <option> content unescaped, allowing XSS in applications that pass untrusted values to them
- Severity
- Medium 6.1
- Published
- 27 Nov 2026
- Last changed
- 27 Nov 2026
- Added to UpHeron
- 27 Nov 2026
- Fixed in
- 4.6.1, 5.9.1
- Weakness
- Cross-site scripting (CWE-79)
- Attack
- Over the network · No login needed · Needs someone to click or open something
- Attacker can
- Read some data · Change some data
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N- Sources
- Project advisories (GitHub)
Description
{html_options} recognises name, class and id in its own switch, and {html_select_date} / {html_select_time} recognise field_array, prefix and the *_empty family. None of these six are passed through smarty_function_escape_special_chars(). Every other parameter in the same handlers is: option values and labels, , selected, the id attribute built from the very same $_name string, and every unrecognised attribute on the $extra path. The six are concatenated straight into , , and content, so a value containing a double quote closes the attribute and everything after it becomes new attributes on the tag; a *_empty` value does not even need a quote, because it lands in element content.
Function handlers are compiled with nofilter (src/Compiler/Template.php:1152, commented "functions are never auto-escaped"), so $escape_html does not cover them either, and I took every measurement below with it turned on rather than off.
Affected software
| Software | Affected versions |
|---|---|
SmartyServers and applications · github:smarty-php/smarty |
|
About Smarty
Web template system in PHP
- Monthly downloads (Packagist)
- 1,214,404Packagist, 29 Nov 2026
- Total downloads (Packagist)
- 47,010,492Packagist, 29 Nov 2026
- GitHub stars
- 2,352GitHub, 29 Nov 2026
- Forks
- 704GitHub, 29 Nov 2026
- Latest release
- v5.9.1GitHub, 29 Nov 2026
- Released
- 27 Nov 2026GitHub
- License
- GNU Lesser General Public LicenseWikidata
- Written in
- PHPWikidata
- First released
- 2001Wikidata
- First published on GitHub
- 30 Oct 2014GitHub
Vulnerabilities in Smarty
- In our list
- 39
- Published in the last 12 months
- 7
- Critical, last 12 months
- 1
- High, last 12 months
- 1
- Known exploited
- 0
- GHSA-p927-2m49-9p39Cached page output can become PHP code in the cache file: unescaped quote in the PHP-tag wrapper, and an unchecked pattern failureHigh 8.1 27 Nov 2026
- GHSA-x8f6-7h7x-vqq8SSRF vulnerability in Smarty {html_image} redirectsLow 27 Nov 2026
- CVE-2026-82531Missing nocache-hash restoration lets assigned data inject executable PHP into regenerated cache filesCritical 9.2 4 Oct 2026
- CVE-2026-62996Smarty Security stream restriction bypass through stream: resourceMedium 20 Jul 2026
- CVE-2026-62993SSRF via redirect bypass of trusted_uri using {fetch}Medium 20 Jul 2026
- CVE-2026-62992Symlink path traversal out of trusted directoriesMedium 20 Jul 2026
References
- GitHub Advisory Database https://github.com/advisories/GHSA-966m-5mq6-5q48
- github.com https://github.com/smarty-php/smarty/security/advisories/GHSA-966m-5mq6-5q48