OpenSNS 3.2.1 Unauthenticated RCE via ShareController shareBox (CVE-2021-48025)

OpenSNS 3.2.1 is vulnerable to unauthenticated code injection in ShareController::shareBox. Crafted GET requests to /index.php?s=weibo/Share/shareBox can reach Schedule::runSchedule and execute code via assert. Exploitation in the wild was observed by Shadowserver on 2023-10-14.

Overview

CVE-2021-48025 affects OpenSNS 3.2.1. The shareBox method of ShareController does not safely handle the query parameter. An unauthenticated attacker can send a crafted GET request to /index.php?s=weibo/Share/shareBox, abusing parse_str and ShareModel::getInfo to reach Schedule::runSchedule and execute code through assert.

Exploitation status

The Shadowserver Foundation first observed exploitation of this vulnerability on 2023-10-14. This is an actively exploited unauthenticated RCE path.

References

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-48025 - VulnCheck advisory: https://www.vulncheck.com/advisories/opensns-3.2.1-unauthenticated-rce-via-weibo-share-sharebox - Nuclei template: https://github.com/projectdiscovery/nuclei-templates/blob/main/http/vulnerabilities/other/opensns-rce.yaml - PeiQi wiki write-up: https://github.com/PeiQi0/PeiQi-WIKI-Book/blob/main/docs/wiki/cms/OpenSNS/OpenSNS%20Application%20ShareController.class.php%20%E8%BF%9C%E7%A8%8B%E5%91%BD%E4%BB%A4%E6%89%A7%E8%A1%8C%E6%BC%8F%E6%B4%9E.md

No fixed version is listed in the NVD entry or the referenced advisories. Verify the vendor advisory before changing production.

What to do

1. If OpenSNS 3.2.1 is deployed, assume compromise if the host is reachable; check access logs for /index.php?s=weibo/Share/shareBox and suspicious query parameters. 2. Block or restrict access to the vulnerable endpoint at the WAF/reverse proxy immediately, especially if a patched build is not yet confirmed. 3. Isolate affected hosts and investigate for post-exploitation activity; credentials and data on the host should be considered exposed. 4. Contact the vendor or review official OpenSNS channels to confirm whether a patched version exists, and apply it if available. 5. If no vendor fix is available, disable or decommission the vulnerable component until a verified mitigation is in place. 6. Monitor NVD, Shadowserver, and vendor advisories for updated guidance.

Sources