CVE-2025-5896 tarojs taro index.js redos

Medium 5.3 Published Updated

Remote attackers can cause denial of service via inefficient regular expressions in the TaroJS CSS-to-React-Native conversion library.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-5896?

CVE-2025-5896 is a medium-severity denial of service vulnerability in tarojs taro, published on 9 Jun 2025. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

A vulnerability was found in tarojs taro up to 4.1.1. It has been declared as problematic. This vulnerability affects unknown code of the file taro/packages/css-to-react-native/src/index.js. The manipulation leads to inefficient regular expression complexity. The attack can be initiated remotely. Upgrading to version 4.1.2 is able to address this issue. The name of the patch is c2e321a8b6fc873427c466c69f41ed0b5e8814bf. It is recommended to upgrade the affected component.

Weakness: CWE-400, CWE-1333

Which versions are affected by CVE-2025-5896?

2 open source packages ship an affected version, including taro-css-to-react-native. It affects 1 product.

PackageAffectedFixed in
taro-css-to-react-native npmAll versions4.1.2
taro-css-to-react-native npmAll versions4.1.2

Products include Taro Taro.

How do I fix CVE-2025-5896?

Upgrade taro-css-to-react-native to 4.1.2 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-5896 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-5896 exists.

Sources

Also known as GHSA-f5xg-cfpj-2mw6.

Is CVE-2025-5896 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free