Upgrading nginx and OpenLiteSpeed (Container Update Procedure)

Multiple severe vulnerabilities have been disclosed in the “nginx" web server, including memory corruption during HTTP/2 processing (CVE-2026-123007), leading to the release of patched versions (1.30.7 and 1.31.9).

In response to this announcement, we reviewed the security status of all operating web server containers. In our environment, nginx is used as a reverse proxy managed via docker-compose, while OpenLiteSpeed (OLS), which runs applications like WordPress, is managed via podman-compose. Note that even with podman-compose, the configuration file uses a shared docker-compose.yml, so the management and update procedures are identical to a Docker environment.

目次

Advertisement

Standardizing on Stable Images and Migrating to Patched Versions

The primary focus of this task was to update the web server group handling external traffic to vulnerability-patched versions, while simultaneously standardizing image tags to the stable releases to avoid being affected by unexpected breaking changes in future operations.

The specific migration goals were as follows:

  • nginx: Update from the currently running 1.27.3 to nginx:stable (1.30.7), the vulnerability-patched stable version.
  • OpenLiteSpeed: Update from the currently running 1.9.3-lsphp84 to 1.9.4-lsphp85, keeping enhanced security and long-term support in mind.
  • Post-update: Ensure that website rendering and administrative dashboard access function normally.

Container Update Pitfalls and OLS 1.9.4 Specification Changes

Before proceeding with the container upgrades, there were three points to organize in advance and specification changes encountered during the work:

  1. Due to Docker and Podman specifications, even if the tag is set to latest, a simple container restart (restart) will continue to use the old image cached locally, meaning the version will not be upgraded. Additionally, since nginx:latest maps to the development version (mainline), it was necessary to switch to the stable tag to prioritize stable operation.
  2. Selecting the OpenLiteSpeed image tag. The latest tag of the official image (litespeedtech/openlitespeed) includes lsphp82, whose support lifecycle is nearing its end. To avoid PHP vulnerability risks and maintain long-term operations, it was necessary to specify 1.9.4-lsphp85, which explicitly states the version and PHP generation.
  3. Inaccessibility of the management interface (WebAdmin console) immediately after updating OpenLiteSpeed to 1.9.4. Accessing port 7080 displayed “WebAdmin Console Is Disabled" and prevented login. This is due to a specification change starting from 1.9.4 where the WebAdmin is disabled by default to mitigate the risk of unauthorized access via PHP.

Image Tag Modification Procedure and Enabling the WebAdmin Console

Based on the above points, we sequentially executed the container updates and configuration changes.

Updating the nginx Container and Changing to the Stable Tag

First, rewrite the image designation in docker-compose.yml from nginx:latest to the stable version nginx:stable.

services:
  nginx:
    image: nginx:stable

Next, pull the image and recreate the container (up -d). In environments running alongside other containers, specifying the service name prevents the restart of other containers.

docker compose pull nginx
docker compose up -d nginx

Checking the startup logs confirmed that the system had switched from the traditional nginx/1.27.3 to the patched nginx/1.30.7.

docker compose logs --tail 20 nginx

Updating the OpenLiteSpeed Container to 1.9.4-lsphp85

Next, edit the docker-compose.yml on the OpenLiteSpeed side to change the image tag to 1.9.4-lsphp85.

services:
  openlitespeed:
    image: litespeedtech/openlitespeed:1.9.4-lsphp85

Although this is a podman-compose environment, the command structure executed is exactly the same as on the Docker side. Pull the image and recreate the container.

podman-compose pull
podman-compose up -d

Enabling WebAdmin in OpenLiteSpeed 1.9.4 (with IP Restrictions)

To enable WebAdmin, which is disabled by default in 1.9.4, create the file /usr/local/lsws/admin/conf/enable_webadmin inside the container and restart OpenLiteSpeed.

While creating an empty file allows access from all IP addresses, to enhance security, we restricted the access source by specifying the permitted network subnet (e.g., 192.168.1.0/24) inside the file.

podman exec openlitespeed sh -c 'echo "192.168.1.0/24" > /usr/local/lsws/admin/conf/enable_webadmin'
podman exec openlitespeed /usr/local/lsws/bin/lswsctrl restart

*In a Docker environment, replace podman with docker when running the commands. Furthermore, if configuration changes are no longer needed, deleting this file and restarting will safely revert it to the disabled state.

Operational Improvements via Post-Update Operations and Access Restrictions

After completing all procedures, we confirmed that nginx is operating normally as 1.30.7 and OpenLiteSpeed as 1.9.4 (PHP 8.5), and that public websites render without errors.

As for the WebAdmin console, users from terminals within the network listed in the allowlist can log in without issues, while access from any other IP address is blocked. Even in a mixed Docker and Podman environment, appropriately managing tag specifications in the compose files has established a framework for consistent maintenance with minimal effort.

Conclusion

Prompted by the disclosure of nginx vulnerabilities, we updated nginx and OpenLiteSpeed (OLS) running under docker-compose and podman-compose. Because a simple restart does not update images, we changed the tags in the compose files to nginx:stable (1.30.7) and openlitespeed:1.9.4-lsphp85, then performed a pull and recreation. Additionally, since WebAdmin is disabled by default starting from OLS 1.9.4, we completed recovery and verification under a secure state with access restrictions by recording permitted IPs in the enable_webadmin file and restarting.