The invention concerns a corrector (10) for chromatic and aperture aberration correction in a scanning electron microscope or a scanning transmission electron microscope, comprising four multipole elements (1, 2, 3, 4) which are consecutively disposed in the optical path (9), the first (1) and fourth (4) of which are used to generate quadrupole fields (5, 6) and the second (2) and third (3) of which are used to generate octupole fields (11, 12) and quadrupole fields (7, 7′, 8, 8′), wherein the latter are superposed magnetic (7, 8) and electric (7′, 8′) fields, and wherein the quadrupole fields (5, 6, 7, 8) of all four multipole elements (1, 2, 3, 4) are successively rotated with respect to one another through 90°. Elimination of errors up to fifth order can be realized with a corrector (10) of this type in that the second (2) and the third (3) multipole elements are designed as twelve-pole elements, and an additional twelve-pole element (13) is inserted between the second (2) and the third (3) multipole element, and is loaded with current and/or voltage, such that an octupole field (14) is generated that is superposed by a twelve-pole field (15).