The security of php127
| Donnée / Data | Valeur / Value | Date |
|---|---|---|
| verif2.revision | f2f65ad | 2026-11-21 |
| verif2.prefixes_annonces | 13 | 2026-11-21 |
| verif2.prefixes_enumeres | 12 | 2026-11-21 |
| verif2.operations | 30 | 2026-11-21 |
| verif2.ini_set | 18 | 2026-11-21 |
The checks described here are not an overall security audit. The cited sources cover four areas: open_basedir, rejection of external XML entities, refusal of proc_open and shell_exec in server mode, and zip archives. This article describes those historical checks, recorded as of 2026-11-21, their findings and limits; it does not present them as qualification of all of reference revision 5b31e86. The figures are in the data block at the top.
Who checks
The decision of 2026-11-20 assigns code writing to gpt-6.1-sol and requests checking by another model family (decisions.md). This attribution describes the chosen organisation; it does not measure its effectiveness or establish the presence or absence of independent human review.
open_basedir: a first check, six bypasses
open_basedir restricts the files a script can reach to a list of directories. It is the inner barrier this site relies on: each application must read only its own directory.
The first adversarial check, carried out by Opus on revision a28b294 and recorded on 2026-11-21 at 16:05 (dettes.md), reproduced six families of bypass:
- the
FILE://scheme written in capitals, which allowed reading, writing, deleting and inspecting outside the permitted directory; hash_fileand the functions of the same family;error_logto a file;- the SQLite commands
ATTACHandVACUUM INTO; - OpenSSL paths through a symbolic link;
- the file descriptor of
proc_open.
A fix was written, then integrated between 16:33 and 17:00 as revision f2f65ad (regressions-bancs.md).
open_basedir: the second check
The second check (open_basedir_2.out.md) covered the binary of revision f2f65ad. The file does not name its author. Its method is as follows: each attempt is played under php127 and under PHP 8.3.6, in a fresh tree, and the output is compared together with the real state of the outside directory, meaning its tree, permissions, sizes, dates and contents.
Its verdict: no attempt managed to read, write, list, create, delete or inspect a path outside the permitted directory where PHP 8.3.6 refuses. The six families are closed, variants included. The report announces 13 scheme prefixes, such as FILE://, file://LOCALHOST or file:%2F%2F, lists 12, and plays 30 file operations for each. An attempt specific to this check starts the process outside the permitted directory, then calls chdir into it and uses only relative paths; nearly 100 functions were played in it. Finally, 18 forms of widening open_basedir through ini_set were refused.
The search for new bypasses covered nested wrappers (php://filter, compress.zlib://, phar://, glob://, data:, zip://), include_path, sessions, ZipArchive, GD, finfo, DOM, SimpleXML, XSD and RelaxNG schemas, XInclude, external entities, DTDs and SPL iterators. No bypass was reproduced.
What else the second check found
php127 is sometimes stricter than PHP, and that is not free. The check records wrongful refusals and discrepancies, all inside the permitted directory or in cases where php127 is stricter than PHP. An include through an internal link followed by .. is refused while PHP accepts it. SPL directory iterators on such a path are refused, and glob returns a wrong result. A relative SQLite ATTACH is refused when the process is not started in the script's directory. A cURL CAINFO file located outside the directory is refused, where PHP accepts it. A file:// prefix preceded by a space causes a fatal error instead of a warning. An application may run into one of these cases.
External XML entities and processes
The acceptation/j4ecosysteme bench checks, in its cases 41 to 44, that DOM and SimpleXML do not resolve an external entity, whether it points to a canary file or to a trap HTTP server. A clarification was decided on 2026-11-20: an external DOCTYPE identifier is accepted without ever being resolved, as PHP 8.3.6 does, because PrestaShop 8.2.1 contains one; external entities, for their part, remain refused (decisions.md).
Cases 45 and 46 of the same bench check that proc_open and shell_exec are refused when php127 serves pages, with the built-in HTTP server as with FastCGI: the canary file that the script tries to create must not appear. An application that runs external commands from a page will therefore not work under php127 in server mode.
What has not been checked
The second check draws up its own list:
- the FastCGI and built-in server modes, for uploads and
move_uploaded_file, which were read but not played; - races between checking a path and opening it;
LOAD DATA LOCAL INFILE, actually sending a file through cURL to a local server, and the real effect ofPRAGMA temp_store_directory;- functions absent from php127, which could not be compared, such as the
SQLite3class,XMLReaderorexif.
The PrestaShop bench also checks, in its cases 25 and 26, the refusal of a zip archive with an entry that leaves the target folder and of a decompression bomb. Beyond these checks, no adversarial check is recorded in our files, whether on the parsing of HTTP requests against hostile input, on behaviour under load or on memory exhaustion. A record of 2026-11-20 notes, moreover, that a test from the official suite made php127 exceed 24 GiB (dettes.md).
What this site does as a result
Since the runtime has only been checked on these points, the separation on this site does not rely on it alone. nginx sits in front and terminates TLS. Each application runs in its own php127 process, under its own system account, in a hardened systemd unit that forbids privilege escalation and makes the system read-only. The MariaDB database listens on no network port. The shop uses no third-party payment module and makes no outbound call. open_basedir comes on top of these barriers, not in their place.