Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Defender event 2004: a problem loading the antimalware definition, reverting to the last-known good set

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

Microsoft Defender Antivirus writes event ID 2004 to its Operational log when it tries to load a new set of definitions and cannot. The message reads: "There was a problem loading antimalware definition. The antimalware engine attempts to load the last-known good set of definitions." The computer is not unprotected at that moment, because Defender falls back to an earlier set, but it is running older definitions than it meant to.

The sections below explain what the event says, what Microsoft's page lists as the reason, how to prove which situation you are in without changing anything, and the three actions Microsoft gives. Nothing before the Fix section changes anything.

What the error means

The event sits in Event Viewer under Applications and Services Logs, then Microsoft, then Windows, then Windows Defender, then Operational. Microsoft's page names it with the symbolic name MALWAREPROTECTION_SIGNATURE_REVERSION. Its description reads: "Microsoft Defender Antivirus encountered an error trying to load signatures and will attempt reverting back to a known-good set of signatures."

The details carry these fields: Signatures Attempted, Error Code, Error Description, Signature Version and Engine Version. The page describes Error Code as the "Result code associated with threat status" and says the values are "Standard HRESULT values". It does not list which error codes appear with event 2004, so read the code in your own event.

Microsoft's own "User action" text for the event reads: "The Microsoft Defender Antivirus client attempted to download and install the latest definitions file and failed. This error can occur when the client encounters an error while trying to load the definitions, or if the file is corrupt." It then says Defender "attempts to revert back to a known-good set of definitions".

Two points are worth noticing. The event is about loading, not only downloading: the page says the client "attempted to download and install" the file and that the failure can be a load error or a corrupt file. And the wording in the event is "antimalware definition", the older name. Current Microsoft pages call the same thing security intelligence (the "Security intelligence updates" section of the updates page), so both words refer to the same content.

Likely causes

Microsoft names two, in one sentence: an error while trying to load the definitions, or a corrupt definitions file. The page gives no further detail about what produces either, so the list below is deliberately short.

Cause the page names What it looks like in the log Where to look
An error while loading the definitions Event 2004 with an Error Code and Error Description The fields of the event itself
A corrupt definitions file Event 2004 after an update that did not finish Events 2000 and 2001 around the same time

The second column of the table is our own reading of how the events relate, not a statement from the page. The page does not say that an interrupted update causes a corrupt file.

Microsoft's updates page adds context about where definitions come from. It lists Windows Update, Windows Update server (WSUS), a Software Update Point (SUP), a file server and the Windows Security app as ways to install security intelligence updates, and it says engine updates "are included with security intelligence updates and are released monthly". If your servers take definitions from an internal source, that source is part of the picture.

Prove the cause before changing anything

All of these are read only.

  1. Open Event Viewer on the affected computer and go to Applications and Services Logs, then Microsoft, then Windows, then Windows Defender, then Operational. Microsoft's page says to press the Windows logo key plus R, type eventvwr.msc and select OK. Find event 2004 and note the Error Code, Error Description, Signature Version and Engine Version in the General or Details tab.

  2. Look at the events before and after it. Event 2000 is the success event, "The antimalware definitions updated successfully", and carries "Current Signature Version" and "Previous Signature Version" fields. Event 2001 is "The security intelligence update failed" and carries an "Update Stage" field with the examples Search, Download or Install, plus an "Update Source" field. If a 2001 with stage Download or Install sits just before the 2004, the update itself was already failing. If the 2000 events are regular and 2004 is a single entry, the situation may have recovered by itself.

  3. Check whether the engine also failed. Event 2003 is "The antimalware engine update failed", and the page says that event "is due to an interruption in network connectivity during an update". Event 2005, "The antimalware engine failed to load because the antimalware platform is out of date", points at the platform rather than the definitions.

  4. Write down the current Signature Version from the newest 2000 event. You need it later if you want to compare the state before and after.

Example (illustrative): on a small office server, the System log shows nothing wrong, but the Defender Operational log shows event 2004 at 02:10 with an HRESULT error, event 2001 at stage Install one minute before it, and then event 2000 at 06:30 with a higher Current Signature Version. That sequence says the computer reverted and then recovered at the next scheduled update. No change is needed beyond watching for a repeat.

Fix

Microsoft's page gives these actions for the event: "Restart the computer and try again. Download the latest definitions from the Microsoft Security Intelligence site." and "Contact Microsoft Technical Support." Work down them in that order. The updates page adds the command that checks for new security intelligence on the machine.

Restart the computer

Before restarting, keep the version you recorded from event 2000, so you can compare afterwards. The page gives no command for this, so the record is the note you made in Event Viewer.

Disruptive step: the next step restarts the computer. On a server that is hosting users, every session ends and every service stops for the length of the restart, and a restart cannot be reversed. Choose a quiet time.

Restart the computer in the way you restart it for any other reason, then open the Operational log again and look for new 2000 and 2004 events.

To undo it: a restart cannot be undone. If the computer does not come back, use the console of the machine or its host to start it.

Check for definitions with the command-line tool

Microsoft's updates page says an elevated Command Prompt, a window started by selecting Run as administrator, can run MpCmdRun.exe with the -SignatureUpdate option to check for new security intelligence updates. The MpCmdRun page says the folder holding MpCmdRun.exe is not in the PATH, so move to it first. The latest version is in C:\ProgramData\Microsoft\Windows Defender\Platform\ followed by the antimalware platform version folder, when that folder exists. If it does not, use C:\Program Files\Windows Defender.

Before running it, note the current Signature Version from the newest event 2000, which is what you will compare against.

Risk: the next command downloads and installs a new set of security intelligence on this computer. The updates page lists commands that roll the change back, but it describes them as returning to "the previous or inbox version" or "the original inbox version", so they may not return to exactly the version you recorded.

MpCmdRun.exe -SignatureUpdate

The same page shows two variants for a different source: adding -UNC with a share path downloads from a file share, and adding -MMPC downloads directly from the Microsoft Malware Protection Center. Use the one that matches where your computers are meant to take definitions from.

To undo it: the commands below install an older set of security intelligence, which lowers protection, so use them only if the new set causes a problem. The updates page lists MpCmdRun.exe -RemoveDefinitions -All to roll security intelligence back to the previous or the original inbox version, and MpCmdRun.exe -RemoveDefinitions -DynamicSignatures to remove only the dynamically downloaded updates. The MpCmdRun page describes -All as restoring "the installed security intelligence to a previous backup copy or to the original default set". Run that only if the new set causes a problem, and expect an earlier set rather than a guaranteed match.

Download the latest definitions manually

Microsoft's page names the Microsoft Security Intelligence site as the place to download the latest definitions. It adds a note that "The size of the definitions file downloaded from the site can exceed 60 MB and shouldn't be used as a long-term solution for updating definitions." The page does not describe how to install the downloaded file, and no steps for it are given here. Microsoft's note describes the downloaded file as not a long-term solution for updating definitions.

If the event keeps coming back

Microsoft's last action is to contact Microsoft Technical Support. Take the Error Code, Error Description, Signature Version and Engine Version from the event with you, and the 2001 and 2003 events from the same period.

Confirm the fix

  • A new event 2000 appears after the action, and its Current Signature Version is higher than the one you recorded. Microsoft says event 2000 means "No action is necessary. The Microsoft Defender Antivirus client is in a healthy state."
  • No new event 2004 appears over the next scheduled updates.
  • No event 2001 with an Update Stage of Download or Install appears for the same source.

What to watch afterwards

  • Repeats of 2004 on one computer only. As general advice, not Microsoft's, that points at the computer or its file rather than at your update source.
  • Repeats on many computers at the same time. As general advice, not Microsoft's, that points at a source they share, such as a WSUS server or a file share, which the updates page lists as a way to install updates.
  • Event 2003, "The antimalware engine update failed.", and event 2006, "The platform update failed." The event page lists each as its own event.
  • The platform. Event 2005 says the engine failed to load "because the antimalware platform is out of date", and the updates page says platform updates come monthly and that platform and engine versions older than N-2 are no longer supported.

Risks and limits

These steps have not been run or lab-tested. The event page does not explain what causes a corrupt definitions file, does not say how long Defender stays on the earlier set, and does not list which Error Code values accompany event 2004. The "Signatures Attempted" field has no description on the page.

The fix list is the vendor's, and it is short. If the Error Code names something outside definitions altogether, treat the page's three actions as a first step only. The manual download is described by Microsoft as not suitable as a long-term method.

Sources