/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/specs/run/react_cve_patch/main.js
15 строк
584 B
Bartek Iwańczuk
fix: opt-in mitigation for React RCE/DoS CVEs (#34676)
02 июн 2026, 20:10
Не верифицирован
02 июн 2026, 20:10
9deee55
Код
Авторство
О чём код?
import { Chunk, parseModelKeys } from "./vulnerable.js"; // RCE: dangerous keys are stripped only when the mitigation is enabled. console.log("keys:", JSON.stringify(parseModelKeys("a:constructor:b"))); // DoS: a self-referential chunk rejects when patched, but resolves with // itself when unpatched. `then` runs synchronously here, so the output order // is deterministic. const chunk = new Chunk(null); chunk.value = chunk; chunk.then( (v) => console.log("then:", v === chunk ? "resolved-cycle" : "resolved-other"), (e) => console.log("then:", "rejected", e.message), );