Share via

Why is the error "Code integrity determined that the image hash of a file is not valid" logged for FortiAmsi.dll?

Scott 20 Reputation points
2026-02-19T19:39:50.5433333+00:00

Our company uses Fortinet's FortiClient application and all of our computers run Windows 11 24H2. The Windows Security log for computers with FortiClient installed is flooded with errors like this:

Code integrity determined that the image hash of a file is not valid. The file could be corrupt due to unauthorized modification or the invalid hash could indicate a potential disk device error.

File Name: \Device\HarddiskVolume3\Program Files\Fortinet\FortiClient\FortiAmsi.dll

The error is logged in the Security log with event ID 5038.

This event can occur multiple times per second making it difficult to find other important events. Fortinet support reports the file is fine and I don't see anything wrong with the digital signatures of the file. Support recommends I reach out to Microsoft and reference Tracking ID #2310270060003398, but I'm not entitled to that level of Microsoft support.

Could Microsoft chime in here? Is there anything I can do to determine why Windows 11 generates this event in the log?

Windows for business | Windows Client for IT Pros | Devices and deployment | Other
0 comments No comments
{count} votes

Answer accepted by question author
  1. Jason Nguyen Tran 12,250 Reputation points Independent Advisor
    2026-02-19T22:14:43.29+00:00

    Hi Scott Hodges,

    This behavior has been observed with certain third-party security integrations, including Fortinet’s FortiClient, when the Antimalware Scan Interface (AMSI) DLL is loaded in a way that Windows code integrity cannot validate. Although the file itself may be correctly signed and not corrupted, Windows will still log an error if the hash validation process does not match expected values. This can occur due to how FortiClient hooks into AMSI, or if kernel-mode drivers load the DLL in a non-standard way.

    The good news is that this does not necessarily indicate a compromised file. Fortinet has confirmed that FortiAmsi.dll is safe, and Microsoft is aware of the logging behavior. At present, the recommended steps are to ensure your systems are fully updated with the latest cumulative updates for Windows 11 24H2, and to confirm you are running the latest FortiClient release. If the issue persists, you may need to filter or forward these events to a separate log collector so they do not overwhelm your Security log.

    I hope this guidance helps you move forward. If you find this answer helpful, please consider clicking Accept Answer so I know your concern has been resolved.

    Jason.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.