A logic issue was addressed with improved checks. This issue is fixed in Safari 18.6, macOS Sequoia 15.6. Processing maliciously crafted web content may lead to an unexpected Safari crash.
https://support.apple.com/en-us/124152
https://support.apple.com/en-us/124149