Skip to content

DOM attribute and CSS injection in contact viewer

High
charlag published GHSA-24v3-254g-jv85 Dec 19, 2025

Package

No package listed

Affected versions

< 314.251111.0

Patched versions

314.251111.0

Description

Impact

Users importing contacts from untrusted sources.

Specifically crafted contact data can lead to some of DOM modifications for the link button next to the field e.g. the link address can be overriden. CSS can be manipulated to give the button arbitrary look and change it's size so that any click on the screen would lead to the specified URL. Modifying event listeners does not seem to be possible so no JS can be executed (which would also be prevented by CSP).

Technical details

The data is included as part of the mithril's hyperscript selector. It is possible to define a value like ][href=https://ddg.gg][style=position:fixed;width:150vw;height:200vh which will be included in the selector passed to Mithril and will be interpreted as part of the code.

Patches

e28345f

Workarounds

Do not open contact viewer on unpatched versions. If the contact was opened, close the app or use keyboard shortcuts to switch to another part of the app.

References

injectionsRight: () => m(`a[href=${getSocialUrl(contactSocialId)}][target=_blank]`, showButton),

injectionsRight: () => m(`a[href=${getWebsiteUrl(website.url)}][target=_blank]`, showButton),

injectionsRight: () => m(`a[href=${getMessengerHandleUrl(messengerHandle)}][target=_blank]`, showButton),

injectionsRight: () => m(`a[href="tel:${phone.number}"][target=_blank]`, callButton),

injectionsRight: () => m(`a[href="https://www.openstreetmap.org/search?query=${prepAddress}"][target=_blank]`, showButton),

Severity

High

CVE ID

No known CVE

Weaknesses

No CWEs