CVE-2025-66224 OrangeHRM is Vulnerable to Code Execution Through Arbitrary File Write from Sendmail Parameter Injection

Critical 9.0 Published Updated

Attackers can execute arbitrary code by injecting commands into the sendmail parameter, leading to file writes and potential remote code execution.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-66224?

CVE-2025-66224 is a critical command injection vulnerability in orangehrm, published on 29 Nov 2025. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

OrangeHRM is a comprehensive human resource management (HRM) system. From version 5.0 to 5.7, the application contains an input-neutralization flaw in its mail configuration and delivery workflow that allows user-controlled values to flow directly into the system’s sendmail command. Because these values are not sanitized or constrained before being incorporated into the command execution path, certain sendmail behaviors can be unintentionally invoked during email processing. This makes it possible for the application to write files on the server as part of the mail-handling routine, and in deployments where those files end up in web-accessible locations, the behavior can be leveraged to achieve execution of attacker-controlled content. The issue stems entirely from constructing OS-level command strings using unsanitized input within the mail-sending logic. This issue has been patched in version 5.8.

Weakness: CWE-94

Which versions are affected by CVE-2025-66224?

It affects 1 product.

Products include Orangehrm Orangehrm.

How do I fix CVE-2025-66224?

No fix has been published for CVE-2025-66224 yet. Limit exposure of the affected software until one is available.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2025-66224 being exploited?

There is no known exploitation of CVE-2025-66224 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-2w7w-h5wv-xr55.

Is CVE-2025-66224 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free