  Isotope ratios have recently been measured in the atmospheres of
directly-imaged and transiting exoplanets from ground-based observations. The
arrival of JWST allows us to characterise exoplanetary atmospheres in further
detail and opens up wavelengths inaccessible from the ground. In this work we
constrain the carbon and oxygen isotopes $^{13}$C, $^{18}$O and $^{17}$O from
CO in the atmosphere of the directly-imaged companion VHS 1256 b through
retrievals of the $\sim$4.1-5.3 $\mu$m NIRSpec G395H/F290LP observations from
the early release science programme (ERS 1386). We detect and constrain
$^{13}$C$^{16}$O, $^{12}$C$^{18}$O and $^{12}$C$^{17}$O at 32, 16 and
10$\sigma$ confidence respectively, thanks to the very high signal-to-noise
observations. We find the ratio of abundances are more precisely constrained
than their absolute values, with $\mathrm{^{12}C/^{13}C=62^{+2}_{-2}}$, in
between previous measurements for companions ($\sim$30) and isolated brown
dwarfs ($\sim$100). The oxygen isotope ratios are $\mathrm{^{16}O/^{18}O
=425^{+33}_{-28}}$ and $\mathrm{^{16}O/^{17}O=1010^{+120}_{-100}}$. All of the
ratios are lower than the local inter-stellar medium and Solar System,
suggesting that abundances of the more minor isotopes are enhanced compared to
the primary. This could be driven by isotope fractionation in protoplanetary
disks, which can potentially alter the carbon and oxygen ratios through isotope
selective photodissociation, gas/ice partitioning and isotopic exchange
reactions. In addition to CO, we constrain $^{1}$H$_2$$^{16}$O and
$^{12}$C$^{16}$O$_2$ (the primary isotopologues of both species), but find only
upper limits on $^{12}$C$^1$H$_4$ and $^{14}$N$^{1}$H$_3$. This work highlights
the power of JWST to constrain isotopes in exoplanet atmospheres, with great
promise in determining formation histories in the future.
