CVE-2024-40857 is a vulnerability fixed by improved state management in Apple products including Safari 18, visionOS 2, watchOS 11, macOS Sequoia 15, iOS 18, iPadOS 18, and tvOS 18. The flaw allows processing of maliciously crafted web content that may lead to universal cross-site scripting (UXSS). The vulnerability has a medium severity rating with a CVSS score of 6.1.