fix: sichere Brotli-Laufzeit ab und erhöhe Patchversionen
All checks were successful
Deploy to production / deploy (push) Successful in 2m23s

This commit is contained in:
Torsten Schulz (local)
2026-10-27 15:32:16 +01:00
parent 67ecac64aa
commit 6578ccdeed
10 changed files with 45 additions and 6 deletions

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
24.22.1

1
backend/.nvmrc Normal file
View File

@@ -0,0 +1 @@
24.22.1

View File

@@ -1,3 +1,4 @@
import './scripts/require-safe-node.cjs';
import express from 'express'; import express from 'express';
import path from 'path'; import path from 'path';
import { fileURLToPath } from 'url'; import { fileURLToPath } from 'url';

View File

@@ -1,3 +1,4 @@
import './scripts/require-safe-node.cjs';
import WebSocket, { WebSocketServer } from 'ws'; import WebSocket, { WebSocketServer } from 'ws';
import https from 'https'; import https from 'https';
import fs from 'fs'; import fs from 'fs';

View File

@@ -1,12 +1,12 @@
{ {
"name": "backend", "name": "backend",
"version": "1.0.0", "version": "1.0.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "backend", "name": "backend",
"version": "1.0.0", "version": "1.0.1",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@gltf-transform/cli": "^4.3.0", "@gltf-transform/cli": "^4.3.0",
@@ -38,6 +38,9 @@
}, },
"devDependencies": { "devDependencies": {
"sequelize-cli": "^6.6.5" "sequelize-cli": "^6.6.5"
},
"engines": {
"node": "^22.23.4 || ^24.22.1 || ^26.12.1"
} }
}, },
"node_modules/@asamuzakjp/css-color": { "node_modules/@asamuzakjp/css-color": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "backend", "name": "backend",
"version": "1.0.0", "version": "1.0.1",
"description": "Nach Änderungen an dependencies: npm install ausführen und package-lock.json committen (npm ci im Deploy).", "description": "Nach Änderungen an dependencies: npm install ausführen und package-lock.json committen (npm ci im Deploy).",
"type": "module", "type": "module",
"main": "index.js", "main": "index.js",
@@ -58,5 +58,8 @@
"sequelize": { "sequelize": {
"uuid": "14.0.0" "uuid": "14.0.0"
} }
},
"engines": {
"node": "^22.23.4 || ^24.22.1 || ^26.12.1"
} }
} }

View File

@@ -0,0 +1,22 @@
// CVE-2026-111497: Node's bundled Brotli decoder must include the security fix.
// Check Node versions: patched releases can still report Brotli 1.2.0.
// https://nodejs.org/en/blog/vulnerability/october-2026-security-releases
'use strict';
function requireSafeNode() {
const [major, minor, patch] = process.versions.node.split('.').map(Number);
const minimum = { 22: [23, 4], 24: [22, 1], 26: [12, 1] }[major];
const patched = minimum && (minor > minimum[0] ||
(minor === minimum[0] && patch >= minimum[1]));
if (!patched) {
throw new Error(
`CVE-2026-111497: Node.js ${process.versions.node} is not an approved patched runtime. ` +
'Use Node.js 22.23.4+, 24.22.1+ or 26.12.1+ within those release lines. ' +
'Recommended: nvm install && nvm use (see .nvmrc). Restart all server/PM2 processes after upgrading.'
);
}
}
requireSafeNode();
module.exports = requireSafeNode;

View File

@@ -1,3 +1,4 @@
import './scripts/require-safe-node.cjs';
import './config/loadEnv.js'; // .env deterministisch laden import './config/loadEnv.js'; // .env deterministisch laden
import http from 'http'; import http from 'http';

7
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "yourpart", "name": "yourpart",
"version": "3.0.0-beta-1.0.0", "version": "3.0.1-beta-1.0.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "yourpart", "name": "yourpart",
"version": "3.0.0-beta-1.0.0", "version": "3.0.1-beta-1.0.0",
"dependencies": { "dependencies": {
"cors": "^2.8.6", "cors": "^2.8.6",
"dompurify": "^3.3.3", "dompurify": "^3.3.3",
@@ -16,6 +16,9 @@
"concurrently": "^9.2.1", "concurrently": "^9.2.1",
"nodemon": "^3.1.14", "nodemon": "^3.1.14",
"npm-run-all2": "^8.0.4" "npm-run-all2": "^8.0.4"
},
"engines": {
"node": "^22.23.4 || ^24.22.1 || ^26.12.1"
} }
}, },
"node_modules/@isaacs/cliui": { "node_modules/@isaacs/cliui": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "yourpart", "name": "yourpart",
"version": "3.0.0-beta-1.0.0", "version": "3.0.1-beta-1.0.0",
"scripts": { "scripts": {
"start": "npm-run-all --parallel build start:backend", "start": "npm-run-all --parallel build start:backend",
"build": "cd frontend && npm run optimize-models && npm run build", "build": "cd frontend && npm run optimize-models && npm run build",
@@ -21,5 +21,8 @@
}, },
"overrides": { "overrides": {
"minimatch": "10.2.4" "minimatch": "10.2.4"
},
"engines": {
"node": "^22.23.4 || ^24.22.1 || ^26.12.1"
} }
} }