PHP2SHELL 취약점에 대한 PHP 업데이트


우분투 26.04 는 기존의 ondrej PPA 를 사용하면 업데이트를 못 받는다. 다행스럽게도 codeberg 의 jmflores 님이 26.04 에 맞는 방법을 코멘트 해 주셔서 긴빠이…. 해서 저장해 놓는다.

꽤 심각한 취약점이라 대응이 늦은 몇몇 사이트는 아예 내려버렸을 정도였다. 패치는 빠르게 나왔고, 대부분 금방 적용했지만, 우분투는 이상하게 공식 레포지토리에서 패치 배포가 느려서 다른 저장소를 추가하여 업데이트했다.


Starting with Ubuntu 26.04 (Resolute), the PHP packages are being unified under a single infrastructure at packages.sury.org.

Migration Steps

1. Removes the legacy PPA from your sources

To avoid “404 Not Found” errors during apt update, remove the old PPA references:

# Removes the legacy PPA from your sources
sudo add-apt-repository --remove ppa:ondrej/php

2. Setup the new Repository

The following commands install the official keyring and point your system to the new unified server.

# Update local index and install dependencies
sudo apt-get update
sudo apt-get -y install lsb-release ca-certificates curl

# Download and install the new GPG keyring (managed via .deb for easier updates)
sudo curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
sudo dpkg -i /tmp/debsuryorg-archive-keyring.deb

# Create the new source list targeting the unified repository
# 'lsb_release -sc' will automatically detect "resolute" on 26.04
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'

# Refresh and upgrade
sudo apt-get update
sudo apt-get upgrade

PHP 8.5 버젼은 맨 마지막 숫자가 12 면 패치 된 버젼이다.

gerd@miniboxx:~$ php -v
PHP 8.5.12 (cli) (built: Oct 21 2026 08:07:33) (NTS)
Copyright (c) The PHP Group
Built by Ubuntu
Zend Engine v4.5.12, Copyright (c) Zend Technologies
with Zend OPcache v8.5.12, Copyright (c), by Zend Technologies


답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다