Full Report
The blog post is about a pop-up asking for a survey that is made by Lighthouse Studio. This appears to be an open-source project, allowing for some access to the source code of Perl. Unfortunately, much of the Perl code is minified. After running Perl::Tidy to make it prettier to read, they still wanted some help reading it. Naturally, they used AI to deobfuscate the code. It had some missing issues, but much of it was correct. After it was deobsfuscated, they found an interesting sink: eval. The subroutine _fop implemented a primitive templating engine. If something had [%...%], then it was evaluated as Perl code. They found this sink but needed to find the correct source. The ciwweb.pl input hid_Random_ACARAT that plugged into this sink with [%257*7%25] to return 49. By adding backticks, this turns into pretty easy code injection. On older versions, the backticks didn't work via some regex replaces. So, they needed to find another way to exploit it. In the case of an array being used for the value, the regex replace doesn't work. So, this worked on all versions.
Analysis Summary
# Vulnerability: Remote Code Execution (RCE) in Lighthouse Studio Survey Scripts
## CVE Details
- **CVE ID:** CVE-2025-34300
- **CVSS Score:** 9.8 (Critical) - *Estimated based on unauthenticated RCE impact*
- **CWE:** CWE-94 (Improper Control of Generation of Code / Code Injection)
## Affected Systems
- **Products:** Sawtooth Software Lighthouse Studio
- **Versions:** All versions prior to 9.16.14
- **Configurations:** Web servers hosting the Perl CGI server-side scripts (typically Linux/Apache with `mod_cgi`).
## Vulnerability Description
The vulnerability exists within the `_fop` subroutine, which serves as a primitive templating engine in the Perl CGI scripts (specifically `ciwweb.pl`). The engine processes tags formatted as `[%...%]` and passes the enclosed content directly to a Perl `eval` statement.
While the software attempted to sanitize inputs using regex replacements (notably targeting backticks), researchers discovered that if an array is passed as the value for specific input parameters (such as `hid_Random_ACARAT`), the regex sanitization fails. This allows an attacker to inject arbitrary Perl code that the server executes with the privileges of the web server process.
## Exploitation
- **Status:** PoC available (demonstrated by researchers)
- **Complexity:** Low
- **Attack Vector:** Network (Remote)
- **Details:** An unauthenticated attacker can trigger the vulnerability by sending a crafted request to the survey scripts. By supplying a mathematical expression like `[%257*7%25]` to the `hid_Random_ACARAT` parameter, the server returns `49`, confirming the injection. This can be escalated to full shell command execution.
## Impact
- **Confidentiality:** High (Full access to server data and survey responses)
- **Integrity:** High (Ability to modify scripts, survey data, or system files)
- **Availability:** High (Ability to disrupt service or take the server offline)
## Remediation
### Patches
- **Version 9.16.14** has been released by Sawtooth Software to address this vulnerability. Administrators should update their Lighthouse Studio installation and ensure the updated Perl CGI scripts are deployed to all web servers hosting surveys.
### Workarounds
- No specific software workarounds are provided; however, implementing a Web Application Firewall (WAF) to block requests containing Perl-style tags (`[% ... %]`) or unusual characters in the affected parameters may provide temporary protection.
## Detection
- **Indicators of Compromise:**
- Review web server logs for requests to `ciwweb.pl` containing `[%` and `%]` tags in the query string or POST body.
- Monitor for unexpected child processes spawned by the Apache/web server user (e.g., `sh`, `bash`, `curl`, `wget`).
- **Detection Methods:** Search web directories for the string `ciwweb.pl` to identify all instances of the vulnerable scripts, as these are often copied manually and may be overlooked during updates.
## References
- [https://www.slcyber.io/research/rce-in-the-most-popular-survey-software-youve-never-heard-of#main](https://www.slcyber.io/research/rce-in-the-most-popular-survey-software-youve-never-heard-of#main)
- [https://www.sawtoothsoftware.com/](https://www.sawtoothsoftware.com/)