Vulnerability DatabaseGHSA-95m2-chm4-mq7m

GHSA-95m2-chm4-mq7m
PHP vulnerability analysis and mitigation

Overview

A persistent XSS vulnerability was discovered in PHP-Textile versions 4.1.2 and older, specifically affecting the image link handling functionality when running the parser in restricted mode. The vulnerability was disclosed on January 7, 2025, and affects the composer package netcarver/textile. The issue was assigned the identifier GHSA-95m2-chm4-mq7m and received a high severity rating (GitHub Advisory).

Technical details

The vulnerability stems from improper validation of user-controllable href input in image links when the parser operates in restricted mode. While the library was designed to sanitize user input in restricted mode, version 4.1.2 and earlier failed to properly validate image link protocols, allowing any link protocol including malicious JavaScript links. The vulnerability received a CVSS v3.1 score of 7.3 (High) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L, indicating network attack vector, low attack complexity, no privileges required, and no user interaction needed (GitHub Advisory).

Impact

The vulnerability allows attackers to inject malicious JavaScript code into pages, which executes when users interact with the affected links. This can lead to attackers performing operations with user's privileges or gaining remote control of user's browsers through automated tools (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been fixed in PHP-Textile version 4.1.3, which implements proper protocol restrictions for image links in restricted mode. Users should upgrade to version 4.1.3 or later. The fix ensures that image links undergo the same validation as text links when the parser is in restricted mode. Restricted mode can be enabled using the Parser::setRestricted() method before calling the parse method (GitHub Commit).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management