CVE-2018-25080
PHP vulnerability analysis and mitigation

Overview

A vulnerability classified as problematic was found in MobileDetect 2.8.31, affecting the function initLayoutType. The issue involves a Cross-Site Scripting (XSS) vulnerability in the session example file that could allow attackers to execute arbitrary web scripts (GitHub PR).

Technical details

The vulnerability exists in the example file sessionexample.php where unescaped PHPSELF usage could lead to XSS attacks. An attacker could exploit this by accessing the URL with a malicious payload, such as http://vulnerablesite.com/vendor/mobiledetect/mobiledetectlib/examples/session_example.php/">alert(42) (GitHub PR).

Impact

Many projects that copy the example files from MobileDetect could become vulnerable to XSS attacks. This could allow attackers to execute arbitrary JavaScript code in users' browsers, potentially leading to session hijacking or other client-side attacks (GitHub PR).

Mitigation and workarounds

The issue was fixed in version 2.8.32 by removing the vulnerable PHP_SELF usage. Users should update to the latest version. Additionally, the project maintainers considered excluding these example files from future releases since they are not relevant to the actual library functionality (GitHub PR, GitHub Release).

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-2025-13828CRITICAL9
  • PHPPHP
  • mautic/core
NoYesDec 02, 2025
CVE-2025-13827HIGH8.8
  • PHPPHP
  • mautic/grapes-js-builder-bundle
NoYesDec 02, 2025
CVE-2025-66312MEDIUM6.2
  • PHPPHP
  • getgrav/grav
NoYesDec 01, 2025
CVE-2025-66311MEDIUM6.2
  • PHPPHP
  • getgrav/grav
NoYesDec 01, 2025
CVE-2025-66310MEDIUM6.2
  • PHPPHP
  • getgrav/grav
NoYesDec 01, 2025

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