Always been curious about this. In the movies we see characters printing out a fake passport on official looking paper, then the spy/superhero etc. shows up at a border and goes through.
If there’s a DB lookup it shouldn’t be possible to vend new passports without a persistent and undetected hack of the backend? If it’s a stolen passport with the photo changed, that should also show up on the lookup screen?