CWE
94
Advisory Published
CVE Published
Updated

CVE-2021-26120: Code Injection

First published: Sun Jan 24 2021(Updated: )

Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring.

Credit: cve@mitre.org cve@mitre.org

Affected SoftwareAffected VersionHow to fix
composer/smarty/smarty<=3.1.38
debian/smarty3
3.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u1
3.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u2
3.1.39-2+deb11u1
3.1.47-2
3.1.48-1
composer/smarty/smarty<3.1.39
3.1.39
Smarty<3.1.39
Debian=9.0
Debian=10.0
Debian=11.0

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2021-26120?

    CVE-2021-26120 has a medium severity rating due to its potential for code injection via malicious function names in Smarty templates.

  • How do I fix CVE-2021-26120?

    To fix CVE-2021-26120, upgrade Smarty to version 3.1.39 or later.

  • What causes CVE-2021-26120?

    CVE-2021-26120 is caused by an insufficiently validated function name in Smarty templates that allows for code injection.

  • Which versions of Smarty are affected by CVE-2021-26120?

    Smarty versions prior to 3.1.39 are affected by CVE-2021-26120.

  • Is there a way to mitigate CVE-2021-26120 without upgrading?

    Mitigating CVE-2021-26120 without upgrading is challenging; it is recommended to implement strict validation of user inputs in templates.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203