Apple has published iOS 17.5.1, which contains a patch for the fault that enabled some deleted images to return after the release of the iOS 17.5 upgrade last week.

As stated in the iOS 17.5.1 release notes, "This update addresses a rare issue where photos that experienced database corruption could reappear in the Photos library even after they were deleted and provides important bug fixes."

That sounds ambiguous, and given that some people have claimed to have seen photos that were removed years ago, a thorough explanation from Apple would have been helpful. That being said, you may download iOS 17.5.1 for your iPhone by going to Settings > General > Software Update on your device.