Skip to content

Open-source live-chat, email support, omni-channel desk. An alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬

fix: update Node.js to 24.22.1 security release (#16386)

Sojan Josebc94917a74ba
diff --git a/.circleci/config.yml b/.circleci/config.yml
index c533e140287..e24d86761f1 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -76,7 +76,7 @@ jobs:
bundle install
- node/install:
- node-version: '24.13'
+ node-version: '24.22.1'
- node/install-pnpm:
version: '10.2.0'
- node/install-packages:
@@ -118,7 +118,7 @@ jobs:
steps:
- checkout
- node/install:
- node-version: '24.13'
+ node-version: '24.22.1'
- node/install-pnpm:
version: '10.2.0'
- node/install-packages:
@@ -150,7 +150,7 @@ jobs:
steps:
- checkout
- node/install:
- node-version: '24.13'
+ node-version: '24.22.1'
- node/install-pnpm:
version: '10.2.0'
- node/install-packages:
diff --git a/.devcontainer/docker-compose.base.yml b/.devcontainer/docker-compose.base.yml
index 375742ff75c..69ef8a81d72 100644
--- a/.devcontainer/docker-compose.base.yml
+++ b/.devcontainer/docker-compose.base.yml
@@ -10,7 +10,7 @@ services:
dockerfile: .devcontainer/Dockerfile.base
args:
VARIANT: 'ubuntu-22.04'
- NODE_VERSION: '24.13.0'
+ NODE_VERSION: '24.22.1'
RUBY_VERSION: '3.4.4'
# On Linux, you may need to update USER_UID and USER_GID below if not your local UID is not 1000.
USER_UID: '1000'
diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml
index d696f99cc55..50f85258015 100644
--- a/.devcontainer/docker-compose.yml
+++ b/.devcontainer/docker-compose.yml
@@ -11,7 +11,7 @@ services:
dockerfile: .devcontainer/Dockerfile
args:
VARIANT: 'ubuntu-22.04'
- NODE_VERSION: '24.13.0'
+ NODE_VERSION: '24.22.1'
RUBY_VERSION: '3.4.4'
# On Linux, you may need to update USER_UID and USER_GID below if not your local UID is not 1000.
USER_UID: '1000'
diff --git a/.github/workflows/frontend-fe.yml b/.github/workflows/frontend-fe.yml
index 3d992662a4b..f9fd93b7bcb 100644
--- a/.github/workflows/frontend-fe.yml
+++ b/.github/workflows/frontend-fe.yml
@@ -29,7 +29,7 @@ jobs:
- uses: actions/setup-node@v4
with:
- node-version: 24
+ node-version-file: .nvmrc
cache: 'pnpm'
- name: Install pnpm dependencies
diff --git a/.github/workflows/run_foss_spec.yml b/.github/workflows/run_foss_spec.yml
index 1cd0d5a3671..fbabe4a2945 100644
--- a/.github/workflows/run_foss_spec.yml
+++ b/.github/workflows/run_foss_spec.yml
@@ -46,7 +46,7 @@ jobs:
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
- node-version: 24
+ node-version-file: .nvmrc
cache: 'pnpm'
- name: Install pnpm dependencies
run: pnpm i
@@ -61,7 +61,7 @@ jobs:
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
- node-version: 24
+ node-version-file: .nvmrc
cache: 'pnpm'
- name: Install pnpm dependencies
run: pnpm i
@@ -112,7 +112,7 @@ jobs:
- uses: actions/setup-node@v4
with:
- node-version: 24
+ node-version-file: .nvmrc
cache: 'pnpm'
- name: Install pnpm dependencies
diff --git a/.github/workflows/size-limit.yml b/.github/workflows/size-limit.yml
index 909636a75c0..1a39b129335 100644
--- a/.github/workflows/size-limit.yml
+++ b/.github/workflows/size-limit.yml
@@ -31,7 +31,7 @@ jobs:
- uses: actions/setup-node@v4
with:
- node-version: 24
+ node-version-file: .nvmrc
cache: 'pnpm'
- name: pnpm
diff --git a/.nvmrc b/.nvmrc
index cf2efde8116..ce62013c39a 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-24.13.0
\ No newline at end of file
+24.22.1
diff --git a/VERSION_CWCTL b/VERSION_CWCTL
index 1545d966571..d5c0c991428 100644
--- a/VERSION_CWCTL
+++ b/VERSION_CWCTL
@@ -1 +1 @@
-3.5.0
+3.5.1
diff --git a/deployment/setup_20.04.sh b/deployment/setup_20.04.sh
index 984bfa75cf3..eee5d3f6e39 100644
--- a/deployment/setup_20.04.sh
+++ b/deployment/setup_20.04.sh
@@ -2,7 +2,7 @@
# Description: Install and manage a Chatwoot installation.
# OS: Ubuntu 20.04 LTS, 22.04 LTS, 24.04 LTS
-# Script Version: 3.5.0
+# Script Version: 3.5.1
# Run this script as root
set -eu -o errexit -o pipefail -o noclobber -o nounset
@@ -19,7 +19,7 @@ fi
# option --output/-o requires 1 argument
LONGOPTS=console,debug,help,install,Install:,logs:,restart,ssl,upgrade,Upgrade:,webserver,version,web-only,worker-only,convert:
OPTIONS=cdhiI:l:rsuU:wvWK
-CWCTL_VERSION="3.5.0"
+CWCTL_VERSION="3.5.1"
pg_pass=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 15 ; echo '')
CHATWOOT_HUB_URL="https://hub.2.chatwoot.com/events"
@@ -891,7 +891,7 @@ function upgrade_redis() {
##############################################################################
-# Update nodejs to v20+
+# Update Node.js to a patched v24.x release
# Globals:
# None
# Arguments:
@@ -900,6 +900,8 @@ function upgrade_redis() {
# None
##############################################################################
function upgrade_node() {
+ local minimum_node_version="24.22.1"
+
echo "Checking Node.js version..."
# Get current Node.js version
@@ -908,8 +910,8 @@ function upgrade_node() {
# Parse major version number
major_version=$(echo "$current_version" | cut -d. -f1)
- if [ "$major_version" -ge 24 ]; then
- echo "Node.js is already version $current_version (>= 24.x). Skipping Node.js upgrade."
+ if [ "$major_version" -eq 24 ] && dpkg --compare-versions "$current_version" ge "$minimum_node_version"; then
+ echo "Node.js is already version $current_version (>= $minimum_node_version on 24.x). Skipping Node.js upgrade."
return
fi
@@ -922,6 +924,13 @@ function upgrade_node() {
apt-get update
apt-get install nodejs -y
+ current_version=$(node --version | cut -c 2-)
+ major_version=$(echo "$current_version" | cut -d. -f1)
+
+ if [ "$major_version" -ne 24 ] || ! dpkg --compare-versions "$current_version" ge "$minimum_node_version"; then
+ echo "Node.js 24.x version $minimum_node_version or newer is required; found $current_version after upgrading." >&2
+ return 1
+ fi
}
##############################################################################
diff --git a/docker/Dockerfile b/docker/Dockerfile
index b55c5f59ee4..9aae29ee2a7 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,8 +1,8 @@
# pre-build stage
-FROM node:24-alpine as node
+FROM node:24.22.1-alpine as node
FROM ruby:3.4.4-alpine3.21 AS pre-builder
-ARG NODE_VERSION="24.13.0"
+ARG NODE_VERSION="24.22.1"
ARG PNPM_VERSION="10.2.0"
ENV NODE_VERSION=${NODE_VERSION}
ENV PNPM_VERSION=${PNPM_VERSION}
@@ -98,7 +98,7 @@ RUN rm -rf /gems/ruby/3.4.0/cache/*.gem \
# final build stage
FROM ruby:3.4.4-alpine3.21
-ARG NODE_VERSION="24.13.0"
+ARG NODE_VERSION="24.22.1"
ARG PNPM_VERSION="10.2.0"
ENV NODE_VERSION=${NODE_VERSION}
ENV PNPM_VERSION=${PNPM_VERSION}