-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Open
Labels
Area: AccountComponent: CustomerIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.May be fixed according to the position in the backlog.Progress: ready for groomingReported on 2.4.7Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Description
Preconditions and environment
User input value such as {{var firstname}}
is parsed in Address Book.
- Magento version: 2.4.3 ~ 2.4.7
- Reproduce: see images below
- It seems there are no security/performance/info leak issues
Steps to reproduce
Magento 2.4.7 + use the system default HTML Address Template
Company: {{if city}}{{var city}}, {{/if}}
Street Address(street1): {{var firstname}}{{var lastname}}{{var country}}
Expected result
The displayed address should be what the customer input.
{{something}}
should not be parsed.
Actual result
Customer input got parsed.
Additional information
The cause is this line Template.php#L317.
str_replace
is dangerous when you don't know what will be replaced, how many times the original string will be modified.
The best way is to sanitize the user input. The "deferred directives" may not be reliable because you still cannot control the user input value.
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
git-seb
Metadata
Metadata
Assignees
Labels
Area: AccountComponent: CustomerIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.May be fixed according to the position in the backlog.Progress: ready for groomingReported on 2.4.7Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch