(PT-2013-63) Positive Technologies Security Advisory
Hash Length Extension in HTMLPurifier
Version: 4.5.0 and earlier
Severity level: Medium
Impact: Signature Forgery, Arbitrary Value Injection into Signed Data
Access Vector: Remote
Base Score: 5.0
CVE: not assigned
HTML Purifier is a standards-compliant HTML filter library written in PHP.
The specialists of the Positive Research center have detected a vulnerability in HTMLPurifier that allows attackers to carry out a "Hash Length Extension" attack..
Class HTMLPurifier_URIFilter_Munge implements a URI filter that replaces all links with a formatted URL, for example, it can be used to rewrite links to pass them into redirection script. To prevent links from being altered HTMLPurifier allows specifying a secret key via "URI.MungeSecretKey" configuration directive. However, this signature generation method is susceptible to a hash length extension attack.
The vulnerability allows attackers to append an arbitrary value to the signed data without knowing the secret key. This may cause other vulnerabilities in the web applications, which use signature generated by HTMLPurifier to keep the links from being altered.
How to fix
Update your software up to the latest version
03.09.2013 - Vendor gets vulnerability details
30.11.2013 - Vendor releases fixed version and details
04.12.2013 - Public disclosure
The vulnerability was detected by Arseny Reutov, Positive Research Center (Positive Technologies Company)
Reports on the vulnerabilities previously discovered by Positive Research:
About Positive Technologies
Positive Technologies is a leading provider of vulnerability assessment, compliance management and threat analysis solutions to more than 1,000 global enterprise clients. Our solutions work seamlessly across your entire business: securing applications in development; assessing your network and application vulnerabilities; assuring compliance with regulatory requirements; and blocking real-time attacks. Our commitment to clients and research has earned Positive Technologies a reputation as one of the foremost authorities on SCADA, Banking, Telecom, Web Application and ERP security, and distinction as the #1 fastest growing Security and Vulnerability Management firm in 2012, as shown in an IDC report*. To learn more about Positive Technologies please visit www.ptsecurity.com
*Source: IDC Worldwide Security and Vulnerability Management 2013-2017 Forecast and 2012 Vendor Shares, doc #242465, August 2013. Based on year-over-year revenue growth in 2012 for vendors with revenues of $20M+