A work machine comprising: an engine that is a power source of the work machine; an exhaust pipe connected to the engine so as to allow exhaust gas of the engine to pass through the exhaust pipe; an exhaust gas aftertreatment device that collects soot contained in the exhaust gas discharged from the engine through the exhaust pipe; an exhaust gas sensor attached to the exhaust pipe so as to detect an amount of soot in the exhaust gas in the exhaust pipe at a position between the engine and the exhaust gas aftertreatment device and configured to generate a soot amount detection signal corresponding to the amount of soot; and a controller connected to the exhaust gas sensor so as to allow the soot amount detection signal of the exhaust gas sensor to be input to the controller, wherein: the controller includes an abnormality judgment section that makes an abnormality judgment that is a judgment whether or not the amount of soot corresponding to the soot amount detection signal is abnormal, and a threshold value setting section that sets a soot amount threshold value that is a threshold value for making the abnormality judgment; and the abnormality judgment section is configured to judge that the amount of soot of the exhaust gas is abnormal to output an abnormality judgment signal when the soot amount detection value that is a value of the amount of soot corresponding to the soot amount detection signal is larger than the soot amount threshold value, characterized in that the abnormality judgment section is configured to make the abnormality judgment on a necessary condition that at least one engine load stabilization condition that is a preset condition for stabilizing a load on the engine is satisfied and to suspend the abnormality judgment when the engine load stabilization condition is not satisfied. an engine that is a power source of the work machine; an exhaust pipe connected to the engine so as to allow exhaust gas of the engine to pass through the exhaust pipe; an exhaust gas aftertreatment device that collects soot contained in the exhaust gas discharged from the engine through the exhaust pipe; an exhaust gas sensor attached to the exhaust pipe so as to detect an amount of soot in the exhaust gas in the exhaust pipe at a position between the engine and the exhaust gas aftertreatment device and configured to generate a soot amount detection signal corresponding to the amount of soot; and a controller connected to the exhaust gas sensor so as to allow the soot amount detection signal of the exhaust gas sensor to be input to the controller, wherein: the controller includes an abnormality judgment section that makes an abnormality judgment that is a judgment whether or not the amount of soot corresponding to the soot amount detection signal is abnormal, and a threshold value setting section that sets a soot amount threshold value that is a threshold value for making the abnormality judgment; and the abnormality judgment section is configured to judge that the amount of soot of the exhaust gas is abnormal to output an abnormality judgment signal when the soot amount detection value that is a value of the amount of soot corresponding to the soot amount detection signal is larger than the soot amount threshold value, characterized in that the abnormality judgment section is configured to make the abnormality judgment on a necessary condition that at least one engine load stabilization condition that is a preset condition for stabilizing a load on the engine is satisfied and to suspend the abnormality judgment when the engine load stabilization condition is not satisfied. the controller includes an abnormality judgment section that makes an abnormality judgment that is a judgment whether or not the amount of soot corresponding to the soot amount detection signal is abnormal, and a threshold value setting section that sets a soot amount threshold value that is a threshold value for making the abnormality judgment; and the abnormality judgment section is configured to judge that the amount of soot of the exhaust gas is abnormal to output an abnormality judgment signal when the soot amount detection value that is a value of the amount of soot corresponding to the soot amount detection signal is larger than the soot amount threshold value, characterized in that the abnormality judgment section is configured to make the abnormality judgment on a necessary condition that at least one engine load stabilization condition that is a preset condition for stabilizing a load on the engine is satisfied and to suspend the abnormality judgment when the engine load stabilization condition is not satisfied.