A shovel comprising: a lower traveling structure; an upper swing structure swingably mounted on the lower traveling structure; an attachment including a boom attached to the upper swing structure, an arm attached to a distal end of the boom, and an end attachment attached to a distal end of the arm; a boom cylinder and an arm cylinder configured to hydraulically drive the boom and the arm, respectively; a controlling valve (V7B) configured to discharge hydraulic oil in an oil chamber of the boom cylinder or the arm cylinder to an outside; and a control device configured to determine whether a machine body including the lower traveling structure and the upper swing structure is in a predetermined unstable state, and control the controlling valve (V7B) to discharge the hydraulic oil from the oil chamber to the outside to automatically move the boom in the lowering direction or the arm in the closing direction, respectively, and control the controlling valve (V7B) to limit an amount of the hydraulic oil discharged from the oil chamber to limit at least one of an amount of movement, a movement speed, and a movement acceleration of the boom or the arm, respectively, to or below a predetermined standard, in response to determining that the machine body is in the predetermined unstable state. a lower traveling structure; an upper swing structure swingably mounted on the lower traveling structure; an attachment including a boom attached to the upper swing structure, an arm attached to a distal end of the boom, and an end attachment attached to a distal end of the arm; a boom cylinder and an arm cylinder configured to hydraulically drive the boom and the arm, respectively; a controlling valve (V7B) configured to discharge hydraulic oil in an oil chamber of the boom cylinder or the arm cylinder to an outside; and a control device configured to determine whether a machine body including the lower traveling structure and the upper swing structure is in a predetermined unstable state, and control the controlling valve (V7B) to discharge the hydraulic oil from the oil chamber to the outside to automatically move the boom in the lowering direction or the arm in the closing direction, respectively, and control the controlling valve (V7B) to limit an amount of the hydraulic oil discharged from the oil chamber to limit at least one of an amount of movement, a movement speed, and a movement acceleration of the boom or the arm, respectively, to or below a predetermined standard, in response to determining that the machine body is in the predetermined unstable state. determine whether a machine body including the lower traveling structure and the upper swing structure is in a predetermined unstable state, and control the controlling valve (V7B) to discharge the hydraulic oil from the oil chamber to the outside to automatically move the boom in the lowering direction or the arm in the closing direction, respectively, and control the controlling valve (V7B) to limit an amount of the hydraulic oil discharged from the oil chamber to limit at least one of an amount of movement, a movement speed, and a movement acceleration of the boom or the arm, respectively, to or below a predetermined standard, in response to determining that the machine body is in the predetermined unstable state.