Their website [1] says "NASA content [...] generally are not copyrighted." It then goes on to say that "NASA should be acknowledged as the source of the material." IANAL, but I would assume that if the data is not copyrighted, then there's no need to attribute the source, making that "should" pretty toothless.
https://meta.wikimedia.org/wiki/Wikilegal/NASA_images
It's easy to imagine that NASA has more limited rights to reproduce and redistribute images produced by their partners though, and they have lots of partners.
Then it was a matter of reverse image search, usually public space images are CC-BY so I figured I should mention that so they don't get into trouble for something easily fixable.