Synk issues for Cross-site Scripting (XSS)-ezyang/htmlpurifier
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.4k
- Forks
- 361
- Avg merge
- 3d 41m
- Merged PRs (30d)
- 2
Description
Hi Team,
Could you please advise on how to fix the following issues? While running a vulnerability test using Snyk, I found multiple problems in the ezyang/htmlpurifier package. Specifically, unsanitized input from an HTTP header flows into the echo statement in maintenance/flush.php at lines 16, 24, 25, 26, 27, and 28, which may lead to a Cross-Site Scripting (XSS) attack.
Additionally, in maintenance/rename-config.php at line 46, unsanitized input from an HTTP header flow into eval, where it is executed as PHP code, potentially resulting in a Code Injection vulnerability.
A similar XSS issue is present in vendor/ezyang/htmlpurifier/maintenance/rename-config.php at multiple lines, including 19, 29, and 39.
I'm currently using ezyang/htmlpurifier version v4.10.0
Could you please help me resolve this?
https://github.com/ezyang/htmlpurifier/blob/master/maintenance/rename-config.php
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review maintenance/flush.php lines 16 and 24-28, maintenance/rename-config.php line 46, and vendor/ezyang/htmlpurifier/maintenance/rename-config.php lines 19, 29, and 39. Trace the reported HTTP-header inputs to the echo and eval statements, then confirm that the XSS and code-injection paths are no longer possible and that the affected maintenance scripts still work as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100