Skip to content Skip to sidebar

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 -

Supporter timezone: Europe/Zagreb (GMT+02:00)

This topic contains 11 replies, has 3 voices.

Last updated by Dražen 1 year, 7 months ago.

Assisted by: Dražen.

Author Posts
November 30, 2023 at 5:56 pm #14965941

dylanH-10

I am trying to:

Link to a page where the issue can be seen: onfido.com/?utm_source=%22%3E%3Cimg%20src=x%20onerror=alert(String.fromCharCode(88,83,83));%3E%3Ca%20href=%22

I expected to see: no xss alert

Instead, I got: the alert which indicates reflected xss vulnerability exists (on language switcher - when parameters are allowed to pass - which we need for UTMs)

December 1, 2023 at 2:40 am #14968257

dylanH-10

note: the vulnerability is that JS script and HTML tags can be coded in various parameters attached to language switcher so that they execute on the page, some sanitization of the parameters should be present to not allow <script> tags and html elements.

December 1, 2023 at 9:33 am #14970597

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hi,

thanks for contacting us.

The vulnerability was fixed in WPML 4.6.8, update and you should be ok.

December 1, 2023 at 3:01 pm #14974081

dylanH-10

Hi Laura and team,
thank you for your quick response. Unfortunately after update to 4.6.8 (and clearing caches) this issue is still persisting for me here
hidden link

Could you assist with this? Seems to me there were some updates, but in my case it doesn't seem to address the bug.

thank you for your help

Screenshot 2023-12-01 at 7.01.39 AM.png
December 1, 2023 at 5:19 pm #14974967

dylanH-10

an update.. I do see that the utms are stripping script info on the links, but it is providing some strange behavior on the language switcher. Maybe this is intentional or just a behavior from adding cruft to the params, but it seems strange, perhaps one of your team can take a look.. Language switcher is on top menu as seen in pic.. Thanks again for your help

Screenshot 2023-12-01 at 9.17.14 AM.png
December 4, 2023 at 11:59 am #14986313

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for your patience.

1) Can you please explain what do you mean by: "it is providing some strange behavior on the language switcher."

2) Does the issue happen with WP default theme and only using WPML plugins? You can use some example code for utm, to test. I am trying to confirm the issue is caused by some other plugin or custom code.

3) If the issue still happens, can you try to show us a simple example on the next test site? This way I can quickly check and escalate further.

- hidden link

Please share steps on how to check it on the test site, so we make sure we have understood the issue correctly.

Thanks,
Drazen

December 4, 2023 at 3:28 pm #14988653

dylanH-10

Hello and thank you for your help
1) Strange behavior: it is adding empty images to the language switcher (where flags would be if I set it up that way) and still opening xss dialog which means <script> is still usable in the parameters
2) The issue happens with all themes even with other plugins turned off
3) On this test site you sent me there are no languages set up or language switchers. I can't set up a whole site from scratch to test this... I need something with a language switcher. We have a very small team with a huge workload. Could you set up a test site with a language switcher in the menu, or at least tell me what I'm supposed to do with an empty theme?

if you look at the page hidden link. the issue still persists, I even tried on a stripped down version of site, which did not have any different results.

the issue persists, and we are having to provide bonus's for vulnerability scavengers at this point..

Screenshot 2023-12-04 at 7.26.36 AM.png
Screenshot 2023-12-04 at 7.26.44 AM.png
December 4, 2023 at 3:37 pm #14988785

dylanH-10

Update: I stripped down to a new instance of wordpress, but our theme has code in it for a language switcher. The code is very straightfoward based on langauge switcher in WPML.

but I can't test our site with a dummy child theme, there is too much operating the pages.

Could you provide a test site with a language switcher I can test, and or would you like to look at our language swticher function? Thank you again for your help

December 4, 2023 at 4:28 pm #14989613

dylanH-10

I have tested on Safari our dev environment with ALL plugins turned off..

issue is still occuring..

would you like to take a look at our function for language switcher?

thank you again for your help.

December 4, 2023 at 6:34 pm #14990665

dylanH-10

I have tested on - hidden link

I'll need a custom language switcher to emulate the issue we have on our site.

December 4, 2023 at 7:26 pm #14991017

dylanH-10

For now I'm gong to turn the feature off for passing utms, there is some improvement, but I'm still able to exexcute scripts via parameters (such as above). I'll pass utms via a script that appends to domain instead and that will have a sanitization script associated with it.. I think the latest update did make some adjustments to the params sanitization, as results are different from last two versions, but still can execute scripts.. thank you all for your help.

December 5, 2023 at 9:10 am #14994489

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for getting back.

I see you have added a custom language switcher to the sandbox test site. If the issue still happens, please share with me a step-by-step guide on how to check and see the issue.

- hidden link

If you need to add some custom code, you can add it via Theme editor option, but please try to keep it simple and minimal, as we can not support or debug custom code issues, but we will be glad to help with any suggestion or check further if it is WPML bug that happens on test site.

Let me know, please.

Thanks,
Drazen

The topic ‘[Closed] Language switcher: reflected XSS vulnerability when passing parameters’ is closed to new replies.