Strange quark matter could be found in the core of neutron stars or forming strange quark stars . As is well known , these astrophysical objects are endowed with strong magnetic fields which affect the microscopic properties of matter and modify the macroscopic properties of the system . In this paper we study the role of a strong magnetic field in the thermodynamical properties of a magnetized degenerate strange quark gas , taking into account \beta -equilibrium and charge neutrality . Quarks and electrons interact with the magnetic field via their electric charges and anomalous magnetic moments . In contrast to the magnetic field value of 10 ^ { 19 } G , obtained when anomalous magnetic moments are not taken into account , we find the upper bound B \lesssim 8.6 \times 10 ^ { 17 } G , for the stability of the system . A phase transition could be hidden for fields greater than this value .