CVE-2022-50898

8.8

NanoCMS · NanoCMS

NanoCMS 0.4 contains an authenticated file upload vulnerability that allows remote code execution through the creation of unvalidated page content.

Executive summary

An authenticated remote code execution vulnerability in NanoCMS 0.4 poses a critical risk to server integrity by allowing attackers to upload and execute arbitrary PHP code.

Vulnerability

The application fails to perform input sanitization or validation during the page creation process, allowing an authenticated attacker to upload PHP files containing arbitrary code. This code is then executed by the server when the page is accessed, granting the attacker control over the underlying system.

Business impact

Successful exploitation of this vulnerability allows an attacker to achieve full remote code execution on the host server. This can lead to total system compromise, including unauthorized data access, modification of site content, and the potential for lateral movement within the network. Given the CVSS score of 8.8, this represents a high-severity risk that requires immediate attention to prevent unauthorized administrative control.

Remediation

Immediate Action: There is no official patch available for NanoCMS 0.4. Administrators should immediately restrict access to the administrative panel to trusted IP addresses only or consider migrating to a actively maintained content management system.

Proactive Monitoring: Review web server access logs for requests targeting the pages directory, particularly those involving unusual file extensions or suspicious script execution patterns. Monitor for unauthorized modifications to the directory structure or newly created PHP files.

Compensating Controls: Implement a Web Application Firewall (WAF) to block requests containing malicious PHP syntax or attempts to upload unauthorized file types to the server. Ensure that the web server process runs with the least privilege necessary to limit the impact of a successful exploit.

Exploitation status

Public Exploit Available: Yes, a public proof-of-concept exists as documented in the ExploitDB entry 50997.

Analyst recommendation

Given the availability of public exploit code and the critical nature of remote code execution, this vulnerability poses a significant threat to any environment running NanoCMS 0.4. Organizations must prioritize the migration to a secure platform or implement strict network-level access controls for the administrative interface immediately to mitigate the risk of compromise.

Sources

Originally found and disclosed by p1ckzi, per the CVE Program record.