Repository navigation
Prevent XSS by disabling Lottie expression evaluation - #3197
Merged
Merged
Conversation
Contributor
Bundle Size Diff
|
Contributor
|
Plugin build for b8e061b is ready 🛎️!
|
Contributor
E2E TestsPlaywright Test Status: See serial and parallel matrix jobs Performance ResultsserverResponse: {"q25":431.65,"q50":446,"q75":471.5,"cnt":10}, firstPaint: {"q25":1685.21,"q50":1739.92,"q75":1814.98,"cnt":10}, domContentLoaded: {"q25":4421.61,"q50":4450.59,"q75":4483.09,"cnt":10}, loaded: {"q25":4425.53,"q50":4454.67,"q75":4487.12,"cnt":10}, firstContentfulPaint: {"q25":3316.72,"q50":3321.69,"q75":3355.67,"cnt":10}, firstBlock: {"q25":21049.09,"q50":21646.65,"q75":21761.9,"cnt":10}, type: {"q25":34.93,"q50":38.68,"q75":43.65,"cnt":10}, typeWithoutInspector: {"q25":33.79,"q50":35.52,"q75":37.02,"cnt":10}, typeWithTopToolbar: {"q25":45.46,"q50":52.52,"q75":70.42,"cnt":10}, typeContainer: {"q25":19,"q50":20.66,"q75":22.35,"cnt":10}, focus: {"q25":178.69,"q50":191.31,"q75":215.94,"cnt":10}, inserterOpen: {"q25":54.29,"q50":57.62,"q75":60.89,"cnt":10}, inserterSearch: {"q25":35.49,"q50":36.58,"q75":37.82,"cnt":10}, inserterHover: {"q25":5.92,"q50":6.33,"q75":7.61,"cnt":20}, loadPatterns: {"q25":2244.72,"q50":2328.48,"q75":2378.9,"cnt":10}, listViewOpen: {"q25":284.08,"q50":294.02,"q75":304.82,"cnt":10} |
pirate-bot
approved these changes
Nov 23, 2026
Contributor
There was a problem hiding this comment.
🟢 Approved
The change removes Lottie expression evaluation from both bundled players, and the base-versus-head runs confirm that embedded expressions no longer execute.
Validation details
- Files reviewed: 3/3 changed files.
- Both bundles lose only the expressions plugin registration. This covers four copies in
dotlottie-player.min.jsand one inlottie-player.min.js[R2]. - A source check found no other reachable
evalpath from animation data in the head bundles. - Static Chromium pages loaded each tree's bundles with the test markup. Base ran the expression for all three elements. Head did not [R6] [R8].
- The frontend and editor previews load only the two patched bundles. The AMP path runs Lottie inside a cross-origin sandboxed AMP iframe.
Untested areas
- The WordPress e2e spec did not run because Docker,
wp-envandnode_modulesare unavailable. - A
.lottiearchive file did not run in a browser. Only the source check covers it. - The variant pass did not settle these places, where the fixed cause may still reach:
inc/render/amp/class-lottie.block.php:35-48— unverified: AMP rendering passes the same user-selected URL to amp-bodymovin-animation instead of the patched players. Whether its engine registers expressions remains unresolved: the checkout…inc/class-registration.php:580-582,1030-1038— unverified: AMP rendering passes the same user-selected URL to amp-bodymovin-animation instead of the patched players. Whether its engine registers expressions remains unresolved: the checkout…
🤖 Automated review · run code-review-agent_6b03e16a42d812.65482695.
🤖 Review agent — review posted ✅ on b8e061b5 · approved · 0 findings · 23 min
Run code-review-agent_6b03e16a42d812.65482695 · trail
Contributor
|
🎉 This PR is included in version 3.2.12 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes https://github.com/Codeinwp/otter-internals/issues/321
Summary
Added an end-to-end test to verify that Lottie animation data is rendered without evaluating embedded JavaScript expressions across different player components, ensuring potentially unsafe expressions are not executed.
Checklist before the final review