fix: sichere Brotli-Laufzeit ab und erhöhe Patchversionen
All checks were successful
Deploy miriamgemeinde / deploy (push) Successful in 11s

This commit is contained in:
Torsten Schulz (local)
2026-10-27 15:32:16 +01:00
parent a382a07765
commit 61ea90a77d
5 changed files with 34 additions and 4 deletions

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
24.22.1

7
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "miriamgemeinde",
"version": "1.1.0",
"version": "1.1.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "miriamgemeinde",
"version": "1.1.0",
"version": "1.1.1",
"dependencies": {
"@iconoir/vue": "^7.7.0",
"@tiptap/extension-bold": "^3.22.2",
@@ -59,6 +59,9 @@
"nodemon": "^3.1.3",
"vite": "^8.0.7",
"vue-eslint-parser": "^9.4.3"
},
"engines": {
"node": "^22.23.4 || ^24.22.1 || ^26.12.1"
}
},
"node_modules/@babel/helper-string-parser": {

View File

@@ -1,6 +1,6 @@
{
"name": "miriamgemeinde",
"version": "1.1.0",
"version": "1.1.1",
"private": true,
"scripts": {
"dev": "vite",
@@ -86,5 +86,8 @@
"last 2 versions",
"not dead",
"not ie 11"
]
],
"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 @@
require('./scripts/require-safe-node.cjs');
const express = require('express');
const bodyParser = require('body-parser');
const cors = require('cors');