MediumGHSA-r77c-qv68-j3ppCVE-2018-25080

Cross-site Scripting in MobileDetect

Published 4 Feb 2023 · Updated 16 Apr 2025

Is your project on an affected mobiledetect/mobiledetectlib?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<2.8.32
Fixed in
2.8.32
Update to the fixed version for your release line, for example:composer require mobiledetect/mobiledetectlib:^2.8.32

Details

A vulnerability, which was classified as problematic, has been found in MobileDetect 2.8.31. This issue affects the function initLayoutType of the file examples/session_example.php of the component Example. The manipulation of the argument $_SERVER['PHP_SELF'] leads to cross site scripting. The attack may be initiated remotely. The exploit has been disclosed to the public and may be used. Upgrading to version 2.8.32 is able to address this issue. The name of the patch is 31818a441b095bdc4838602dbb17b8377d1e5cce. It is recommended to upgrade the affected component. The identifier VDB-220061 was assigned to this vulnerability.

Is GHSA-r77c-qv68-j3pp in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected mobiledetect/mobiledetectlib, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.