To constrain the equation of state of cold dense matter, astrophysical measurements are essential. These are mostly based on observations of neutron stars in the X-ray band, and, more recently, also on gravitational wave observations. Of particular interest are observations of unusually heavy or light neutron stars which extend the range of central densities probed by observations and thus permit testing nuclear physics predictions over a wider parameter space. Here we report on the analysis of such a star, a central compact object within the supernova remnant HESS J1731-347. We estimate the mass and radius of the neutron star to be M = 0.77(20)Msun and R = 10.4(8) km, respectively, based on modeling of the X-ray spectrum and a robust distance estimate from Gaia observations. Our estimate implies that this object is either the lightest neutron star known, or a "strange star” with a more exotic equation of state. Adopting a standard neutron star matter hypothesis significantly constrains the corresponding equations of state.