/

CVE-2025-69634

Severity:

CRITICAL RISK

(9.0)

CSRF in Dolibarr ERP & CRM perms.php Notes Field

CVE-2025-69634

Awaiting Analysis

Vulnerability type

Category:

Cross-Site Request Forgery (CSRF)

CWE:

CWE-284, CWE-352, CWE-598

Impact:

Privilege Escalation

Severity:

CRITICAL RISK

(9.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A Cross-Site Request Forgery (CSRF) vulnerability in Dolibarr ERP & CRM 22.0.9 allows an attacker to trigger privileged actions through the permission management interface.

By abusing the notes field in perms.php, a remote attacker can trick an authenticated administrator or privileged user into unknowingly escalating privileges for another account.

Affected context

This issue arises in Dolibarr ERP & CRM deployments where users manage roles and permissions through the perms.php interface.

The vulnerability appears when state-changing requests that update permissions and associated notes are accepted without robust CSRF protection, such as anti-CSRF tokens bound to the user session.

It primarily impacts environments where privileged users (administrators, managers) regularly browse external sites, email links, or embedded content while logged into Dolibarr.

Exploit preconditions

  • Attack surface: Web application HTTP(S) interface, specifically the permission management endpoint(s) behind perms.php.
  • Required access: The attacker needs the victim to be authenticated in Dolibarr with sufficient privileges to modify user permissions (e.g., admin or equivalent).
  • Trigger point: Victim's browser loading a malicious page, email, or embedded resource that silently issues crafted HTTP requests to Dolibarr, targeting the notes field and associated permission controls.
  • Why exploitation is possible: Critical permission-changing operations lack strong CSRF defenses and rely only on the victim's existing session cookies, allowing a third-party site to induce state changes without explicit user intent.

Why this happens

The root cause is a missing or insufficient CSRF protection mechanism on permission-modification endpoints, mapping directly to CWE-352: Cross-Site Request Forgery.

State-changing HTTP requests related to user permissions and their metadata (including the notes field) can be initiated cross-origin, and the application trusts the browser's cookies as proof of intent.

Additionally, inadequate authorization checks on the server side (CWE-284) and potential exposure of sensitive parameters through predictable or easily manipulated request structures (CWE-598) may compound the risk.

In abstract terms, the application treats any request with valid session credentials as legitimate, without requiring a per-request, user-bound token or explicit confirmation for high-impact operations.

Potential impact

  • Attacker-controlled escalation of privileges for existing user accounts.
  • Unauthorized granting of administrative or finance-related roles to attacker-controlled accounts.
  • Modification of permission notes or audit-related metadata to hinder investigations.
  • Lateral movement within the ERP/CRM environment by abusing newly granted capabilities.
  • Indirect access to sensitive business data, financial records, or customer information once privileges are elevated.

General mitigation guidance

Effective mitigation focuses on enforcing strong, server-validated intent for all permission-changing operations:

  • Require per-request anti-CSRF tokens that are unpredictable, session-bound, and validated on every state-changing request to perms.php and related endpoints.
  • Ensure that permission updates, including changes in the notes field, are processed only via POST (or other non-idempotent) methods with CSRF checks, avoiding sensitive changes over simple GET requests.
  • Introduce a privilege-sensitive workflow, such as explicit confirmation or step-up reauthentication for changes that modify user roles or access levels.
  • Apply the principle of least privilege so that only strictly necessary roles can alter permissions, reducing the blast radius of a compromised session.
  • Normalize and validate all input fields (including notes) but avoid relying on client-side controls for authorization or CSRF defense.

How teams detect issues like this

Detection commonly combines code-centric and behavior-centric approaches:

  • Static analysis and code review:
  • Flag state-changing endpoints that lack anti-CSRF token validation.
  • Identify permission-modification logic in perms.php that accepts cross-origin requests without checking origin, referer, or CSRF tokens.
  • Review controllers and forms tied to role/permission management to ensure proper method use (POST) and token verification.
  • Security test automation:
  • Use web security scanners or CI-integrated tools to simulate cross-origin requests to permission endpoints and observe whether changes are accepted without CSRF tokens.
  • Add regression tests that assert failure for permission changes when CSRF tokens are missing, invalid, or reused improperly.
  • Operational monitoring:
  • Monitor logs for anomalous permission changes, especially bursts of updates originating from unexpected IPs, user agents, or referrers.

Sources

SourceLink
github.comgithub.com/simone97212/DolibarrVuln
github.comgithub.com/simone97212/vuln-research/tree/main/CVE-2025-69634

Frequently asked

questions

Yes. An attacker can host a malicious page anywhere on the internet and, if a privileged Dolibarr user visits it while logged in, the attacker can attempt to trigger unauthorized permission changes via CSRF.

The attacker does not need their own valid credentials but does depend on a victim who is already authenticated and has sufficient privileges to change permissions. The attack leverages the victim's session.

The most robust pattern is to enforce CSRF protections on all state-changing endpoints: use unique, session-bound anti-CSRF tokens, validate them server side, restrict sensitive operations to POST (or similar) methods, and combine this with strict authorization checks for permission changes.

Adopt a security-by-design approach: define a standard framework or middleware for CSRF protection, require it for every form or API that changes state, perform threat modeling for new admin and permission-related features, and back this with automated tests and static checks that fail builds when CSRF patterns are missing.

Find out what's already
exploitable in your codebase.