Skip to content

Commit b17db45

Browse files
1 parent 925884a commit b17db45

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

SPECS/nodejs/CVE-2025-22150.patch

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
From 7a5aff9d9e6b6b541f7528cedb9bcf2046289f1a Mon Sep 17 00:00:00 2001
2+
From: Kanishk Bansal <[email protected]>
3+
Date: Wed, 5 Feb 2025 12:14:46 +0000
4+
Subject: [PATCH] Address CVE-2025-22150
5+
6+
---
7+
deps/undici/src/lib/web/fetch/body.js | 10 +++++++++-
8+
1 file changed, 9 insertions(+), 1 deletion(-)
9+
10+
diff --git a/deps/undici/src/lib/web/fetch/body.js b/deps/undici/src/lib/web/fetch/body.js
11+
index 26cce5f3..594620b5 100644
12+
--- a/deps/undici/src/lib/web/fetch/body.js
13+
+++ b/deps/undici/src/lib/web/fetch/body.js
14+
@@ -20,6 +20,14 @@ const { isErrored } = require('../../core/util')
15+
const { isArrayBuffer } = require('node:util/types')
16+
const { serializeAMimeType } = require('./data-url')
17+
const { multipartFormDataParser } = require('./formdata-parser')
18+
+let random
19+
+
20+
+try {
21+
+ const crypto = require('node:crypto')
22+
+ random = (max) => crypto.randomInt(0, max)
23+
+} catch {
24+
+ random = (max) => Math.floor(Math.random(max))
25+
+}
26+
27+
const textEncoder = new TextEncoder()
28+
29+
@@ -100,7 +108,7 @@ function extractBody (object, keepalive = false) {
30+
// Set source to a copy of the bytes held by object.
31+
source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
32+
} else if (util.isFormDataLike(object)) {
33+
- const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}`
34+
+ const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
35+
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
36+
37+
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
38+
--
39+
2.43.0
40+

SPECS/nodejs/nodejs.spec

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Name: nodejs
55
# WARNINGS: MUST check and update the 'npm_version' macro for every version update of this package.
66
# The version of NPM can be found inside the sources under 'deps/npm/package.json'.
77
Version: 20.14.0
8-
Release: 4%{?dist}
8+
Release: 5%{?dist}
99
License: BSD AND MIT AND Public Domain AND NAIST-2003 AND Artistic-2.0
1010
Vendor: Microsoft Corporation
1111
Distribution: Azure Linux
@@ -19,6 +19,7 @@ Patch0: disable-tlsv1-tlsv1-1.patch
1919
Patch1: CVE-2019-10906.patch
2020
Patch2: CVE-2024-21538.patch
2121
Patch3: CVE-2025-23083.patch
22+
Patch4: CVE-2025-22150.patch
2223
BuildRequires: brotli-devel
2324
BuildRequires: c-ares-devel
2425
BuildRequires: coreutils >= 8.22
@@ -130,6 +131,9 @@ make cctest
130131
%{_prefix}/lib/node_modules/*
131132

132133
%changelog
134+
* Wed Feb 05 2025 Kanishk Bansal <[email protected]> - 20.14.0-5
135+
- Patch CVE-2025-22150
136+
133137
* Mon Jan 27 2025 Sumedh Sharma <[email protected]> - 20.14.0-4
134138
- Patch CVE-2025-23083
135139

0 commit comments

Comments
 (0)