ReDoS vulnerability in ua-parser/uap-php

ua-parser/uap-php Updated 02 Oct 2025

Summary

07/06/2024
MODERATE
Yes i
Moderate
Not published

GHSA-78hm-5hjw-58mh: ua-parser/uap-php ReDoS vulnerability. Affects ua-parser/uap-php versions < 3.8.0. Fixed in 3.8.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

ua-parser/uap-php is a library that provides user-agent string parsing functionality. It is commonly used to extract information about the user's browser, operating system, and device from the user-agent string. The library is available on Packagist and can be installed via Composer. However, versions prior to 3.8.0 are vulnerable to a ReDoS (Regular Expression Denial of Service) attack.

Vulnerability Detail

The vulnerability in ua-parser/uap-php is due to a regex expression that can be exploited to cause a ReDoS attack. ReDoS attacks occur when a malicious user supplies a specially crafted input that causes the regular expression matching to take an excessive amount of time, leading to a denial of service condition. This can impact the availability and performance of the application using the library. The vulnerability has a moderate severity rating and has been reviewed by GitHub.

How To Fix

Minimum fixed version

3.8.0

This is the first release that contains the fix.

composer require ua-parser/uap-php:3.8.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

ua-parser/uap-php versions prior to 3.8.0 are vulnerable to a ReDoS attack. It is recommended to update to version 3.8.0 or later to fix the vulnerability. Regularly updating dependencies and staying informed about security vulnerabilities is crucial to ensure the security and stability of your application.

See every vulnerability recorded for ua-parser/uap-php →

Share this vulnerability

FAQ

ua-parser/uap-php is a library that provides user-agent string parsing functionality. It is commonly used to extract information about the user's browser, operating system, and device from the user-agent string.

A ReDoS (Regular Expression Denial of Service) vulnerability occurs when a regular expression matching operation takes an excessive amount of time, leading to a denial of service condition. It can be exploited by supplying a specially crafted input that triggers the excessive matching time.

The vulnerability can impact the availability and performance of the application using ua-parser/uap-php. A malicious user can exploit the vulnerability to cause a denial of service condition, potentially affecting the functionality of the application.

To fix the vulnerability, it is recommended to update ua-parser/uap-php to version 3.8.0 or later. This version includes a fix for the ReDoS vulnerability. You can update the library by running the following command in your project's root directory:

composer update ua-parser/uap-php

How To Fix

Minimum fixed version

3.8.0

This is the first release that contains the fix.

composer require ua-parser/uap-php:3.8.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback