CVE-2025-48883
PHP vulnerability analysis and mitigation

Overview

Chrome PHP, a library that allows users to control chrome/chromium in headless mode from PHP, was found to have a security vulnerability (CVE-2025-48883) where CSS Selector expressions were not properly encoded. This vulnerability was discovered in May 2025 and affects all versions prior to 1.14.0. The issue could potentially lead to cross-site scripting (XSS) vulnerabilities when handling CSS selector expressions (GitHub Advisory).

Technical details

The vulnerability stems from improper encoding of CSS Selector expressions in the CssSelector class. When processing selectors like 'input[type="password"]', the lack of proper encoding could result in JavaScript syntax errors and potential script injection. The issue was particularly concerning because it allowed attackers to inject arbitrary JavaScript code through the selector parameter, which would be executed in the context of the browser (GitHub Pull).

Impact

The vulnerability could allow remote attackers to perform cross-site scripting (XSS) attacks if they could influence the contents of CSS selectors passed to the library. This could lead to arbitrary JavaScript execution within the browser context, potentially allowing attackers to steal sensitive information or perform unauthorized actions (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in version 1.14.0 of the Chrome PHP library. For users unable to upgrade immediately, a workaround is available by manually encoding selectors using json_encode() before passing them to the library. The recommended workaround code is: if (\version_compare(\Composer\InstalledVersions::getVersion('chrome-php/chrome'), '1.14.0', '<')) { $selector = \json_encode($selector); } (GitHub Advisory).

Community reactions

The vulnerability was treated as a high-severity security issue by the project maintainers. The fix was implemented as a security patch in a minor release, breaking with semantic versioning conventions but following common security practice for addressing critical vulnerabilities (GitHub Pull).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-21857HIGH8.3
  • PHPPHP
  • redaxo/source
NoYesJan 07, 2026
CVE-2025-61676MEDIUM6.1
  • PHPPHP
  • october/system
NoYesJan 10, 2026
CVE-2025-61674MEDIUM6.1
  • PHPPHP
  • october/system
NoYesJan 10, 2026
CVE-2026-21896MEDIUM5.8
  • PHPPHP
  • getkirby/cms
NoYesJan 08, 2026
CVE-2026-22242MEDIUM4.9
  • PHPPHP
  • coreshop/core-shop
NoYesJan 08, 2026

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