GHSA-8c6x-g4fw-8rf4 Whatsapp-Chat-Exporter has Cross-Site Scripting vulnerability in HTML output of chats.

Not scored Published

An XSS vulnerability in WhatsApp-Chat-Exporter allows attackers to inject malicious scripts into exported HTML chat files, requiring user interaction to execute.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is GHSA-8c6x-g4fw-8rf4?

GHSA-8c6x-g4fw-8rf4 is a cross-site scripting vulnerability in Whatsapp-Chat-Exporter, published on 10 Jul 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

Impact

A Cross-Site Scripting (XSS) vulnerability was found in the HTML output of chats. XSS is intended to be mitigated by Jinja's escape function. However, autoescape=True was missing when setting the environment. Although the actual impact is low, considering the HTML file is being viewed offline, an adversary may still be able to inject malicious payloads into the chat through WhatsApp. All users are affected.

Patches

The vulnerability is patched in 0.9.5. All users are strongly advised to update the exporter to the latest version.

Workarounds

No workaround is available. Please update the exporter to the latest version.

References

https://github.com/KnugiHK/WhatsApp-Chat-Exporter/commit/bfdc68cd6ad53ceecf132773f9aaba50dd80fe79 https://owasp.org/www-community/attacks/xss/

Which versions are affected by GHSA-8c6x-g4fw-8rf4?

2 open source packages ship an affected version, including Whatsapp-Chat-Exporter and whatsapp-chat-exporter.

PackageAffectedFixed in
Whatsapp-Chat-Exporter PyPIAll versions0.9.5
whatsapp-chat-exporter PyPIAll versions0.9.5

How do I fix GHSA-8c6x-g4fw-8rf4?

Upgrade Whatsapp-Chat-Exporter to 0.9.5 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is GHSA-8c6x-g4fw-8rf4 being exploited?

There is no known exploitation of GHSA-8c6x-g4fw-8rf4 in the wild and no public exploit code.

Sources

Is GHSA-8c6x-g4fw-8rf4 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free