#1080978 libreoffice: steals the PRIMARY selection

Package:
libreoffice
Source:
libreoffice
Description:
office productivity suite (metapackage)
Submitter:
Vincent Lefevre
Date:
2026-01-10 11:06:10 UTC
Severity:
normal
Tags:
#1080978#5
Date:
2024-09-06 09:17:43 UTC
From:
To:
LibreOffice steals the PRIMARY selection when a search is active,
just when the mouse happens to move over the LibreOffice window.
The PRIMARY selection should be changed only when the user selects
something, not by just moving the mouse!

There are possible security implications: if the search text contains
private data, and the PRIMARY selection is pasted in a web browser,
such private data may be sent to some remote site. Note that the user
does not necessarily know that the PRIMARY selection has been stolen.
So what he pastes may not be what he thinks.

To reproduce:

1. Open a .odt file with LibreOffice.
2. Type Ctrl-F to start a search.
3. Type some text to search (a single character is sufficient).
4. Select some text in another application, e.g. xterm.
5. Move the cursor over the LibreOffice window so that this window
   gets the focus.

Result: The text in the LibreOffice search field automatically gets
selected and becomes the new PRIMARY selection.

Note that with xterm, xterm unhighlight its selected text when the
PRIMARY selection has changed, so it's easier to see the issue.

#1080978#10
Date:
2024-09-06 09:40:46 UTC
From:
To:
I've just reported the bug upstream.

Actually, other LibreOffice applications list Calc and Draw are also
affected, not just Writer.

This can be seen by pasting the PRIMARY selection (i.e. with the
middle button) somewhere else.

#1080978#17
Date:
2024-09-09 09:19:51 UTC
From:
To:
BTW, testing is affected (and maybe earlier versions too: I do not
use LibreOffice often).

#1080978#24
Date:
2024-11-26 09:17:32 UTC
From:
To:
FYI, I use the FVWM window manager, and the bug is also reproducible
with the twm window manager (which may be the simplest window manager
available).

Upstream cannot reproduce it with KDE Plasma Wayland, but I suppose
that Wayland works differently than X concerning the PRIMARY selection.

#1080978#31
Date:
2026-01-10 10:10:54 UTC
From:
To:
Es gibt eine Familienspende in Höhe von 1.850.000,00 USD von Cheng Charlie
Saephan. Bitte antworten Sie für weitere Informationen. Denken Sie daran,
Ihrer Familie und den Bedürftigen in Ihrer Umgebung Gutes zu tun.

Dies ist bereits der zweite Versuch, Sie zu erreichen. Bitte antworten Sie
für weitere Details.

#1080978#36
Date:
2026-01-10 10:10:54 UTC
From:
To:
Es gibt eine Familienspende in Höhe von 1.850.000,00 USD von Cheng Charlie
Saephan. Bitte antworten Sie für weitere Informationen. Denken Sie daran,
Ihrer Familie und den Bedürftigen in Ihrer Umgebung Gutes zu tun.

Dies ist bereits der zweite Versuch, Sie zu erreichen. Bitte antworten Sie
für weitere Details.