No.
If you're using some other Linux flavor or a prerelease, or to verify by yourself, issue on the command line:
xz --version
xz (XZ Utils) 5.2.5
liblzma 5.2.5
(this is a xUbuntu 22.04, updated yesterday).
According to this site: https://gist.github.com/thesamesam/223949d5a074ebc3dce9ee78baad9e27
You need to have versions 5.6.0 or 5.6.1 of xz or liblzma installed
(xz-utils provides the library liblzma)
… (to be affected by the backdoor.)
So you can test your installation with the above command.
According to Canonical, only testing versions (24.04) might be affected.
Source: https://discourse.ubuntu.com/t/xz-liblzma-security-update/43714
update
Some people advise not to run xz from the command line at all. They're arguing, AFAIK, that a maliciously crafted program, which tries to open a backdoor in sshd when run by systemd, is suspicious of having additional bad side effects, which is a legitimate concern to have, if we think of something made to vandalize a system. I don't agree with these concerns, but let us get this out of the way:
Of course it is perfectly fine to check for the version of xz in a different way. Recommended has been, by @Quasimodo,
strings -a $(which xz) (in a different fashion, not recommended for untrustworthy files)
This is fine. Go for it, if you have the slightest doubts, xz could contain additional attack vectors.
I don't.
My reasoning is: A) This is not a virus, which spreads itself by running it. It is a high impact, very well crafted backdoor, hidden in binary test files which should be spread by the distributions themselves and a lot of effort has gone into gaining enough trust to do so. A second attack vector would have increased the chances of getting detected, especially in a small and trivial code segments, which reports a version number and is easy to understand in a diff.
B) If people are running test releases in production, they are already at high risk. You shouldn't do it. If they had it running for some days, and you still assume that there is another issue, it is already too late. Well - there might be some admins, which only start sshd occasionally and haven't done so, since installing the updated, backdoor providing version of liblzma. And from these admins, some might take their advice from AU. Fine.
C) But isn't liblzma everywhere, even in the kernel? I heard so! What does it mean, everywhere? It's surely a gross exaggeration, isn't it?
Let's do some investigation. Don't believe rumors.
for f in /bin/* /sbin/*
do
ldd $f 2>/dev/null | grep -q liblzma.so && echo $f
done | wc -l
What number do you expect? How many programs?
3, 30, 300?
I get 614.
Ironically, one suggestion has been, to use
apt-cache policy xz-utils
for testing. Unfortunately, apt-cache is dynamically linked to liblzma, too - as stated, over 600 files on my system. As is systemctl, journalctl, systemd and a few variants of systemd, so if you really think, there is a second attack vector, it is far too late.
So no, I'm not convinced at all, that issuing xz --version increases your risk an iota. Therefore I will not revoke my recommendation to use it.
Some guy on the internet has used it, and it reported the correct version of the malicious program. No other observations were reported.