#1136204 invesalius: CVE-2024-44825

Package:
src:invesalius
Source:
src:invesalius
Submitter:
Salvatore Bonaccorso
Date:
2026-11-16 09:51:03 UTC
Severity:
normal
Tags:
#1136204#5
Date:
2026-05-10 18:09:57 UTC
From:
To:
Hi,

The following vulnerability was published for invesalius.

CVE-2024-44825[0]:
| Directory Traversal vulnerability in Centro de Tecnologia da
| Informaco Renato Archer InVesalius3 v3.1.99995 allows attackers to
| write arbitrary files unto the system via a crafted .inv3 file.


If you fix the vulnerability please also make sure to include the
CVE (Common Vulnerabilities & Exposures) id in your changelog entry.

For further information see:

[0] https://security-tracker.debian.org/tracker/CVE-2024-44825
https://www.cve.org/CVERecord?id=CVE-2024-44825
[1] https://github.com/invesalius/invesalius3/commit/8b966260b3d9510e3ddc473aac4cc6578bab3aab

Please adjust the affected versions in the BTS as needed.

Regards,
Salvatore

#1136204#10
Date:
2026-05-14 11:40:08 UTC
From:
To:
found 1136204 3.1.99998-7
thanks

Thanks for the report. I'm going to assume that version -7 is also
affected, so that -8 (recently uploaded) can propagate to testing
first.

Then I will try to apply the patch quoted above.

Thanks.

#1136204#17
Date:
2026-05-14 12:23:31 UTC
From:
To:
tags 1136204 help
thanks
over the current version:

Importing patch 8b966260b3d9510e3ddc473aac4cc6578bab3aab.patch
Applying patch 8b966260b3d9510e3ddc473aac4cc6578bab3aab.patch
patching file .gitignore
patching file invesalius/project.py
Hunk #1 FAILED at 31.
Hunk #2 succeeded at 481 with fuzz 1 (offset -20 lines).
Hunk #3 FAILED at 512.
Hunk #4 FAILED at 537.
3 out of 4 hunks FAILED -- rejects in file invesalius/project.py
Patch 8b966260b3d9510e3ddc473aac4cc6578bab3aab.patch does not apply (enforce with -f)
Patch 8b966260b3d9510e3ddc473aac4cc6578bab3aab.patch is not applied

In particular, the patch tries to modify this:

-    tar_filter = getattr(tarfile, "tar_filter", None)  # For python < 3.12
+    tar_filter = getattr(tarfile, "tar_filter", None)

but the Debian package in unstable does not have such line yet, so we would
need a yet-to-see amount of patches before [8b96626] for this to work.

I'm tagging this as "help" and Cc:ing Thiago (who created the package)
in the hope that he (or somebody else) can care about this.

Thanks.

#1136204#24
Date:
2026-05-14 12:35:09 UTC
From:
To:
Hmm, I got this bounce. Is the address valid at all?

<tfmoraes@cti.gov.br>: host 200.144.113.118[200.144.113.118] said: 550 5.1.1
    <tfmoraes@cti.gov.br>: Recipient address rejected: cti.gov.br (in reply to
    RCPT TO command)

Trying another known address for Thiago now.

Thanks.

#1136204#29
Date:
2026-05-14 20:06:17 UTC
From:
To:
Hi,

since Thiago's address was bouncing I'm hereby CCing other contacts.

Kind regards
    Andreas.

Am Thu, May 14, 2026 at 02:35:09PM +0200 schrieb Santiago Vila:

#1136204#34
Date:
2026-05-14 20:17:53 UTC
From:
To:

#1136204#41
Date:
2026-07-26 15:52:08 UTC
From:
To:
I wrote a patch for version 3.1.99998 to fix CVE-2024-44825

Could someone test if my patch is working with the import of an
compressed and uncompressed .inv3 file?

Patch:

https://salsa.debian.org/jahnke/invesalius/-/blob/master/debian/patches/0011-fix-cve-2024-44825.patch?ref_type=heads

Repo:

https://salsa.debian.org/jahnke/invesalius

#1136204#46
Date:
2026-11-10 17:21:04 UTC
From:
To:
Hi,

Christoph asked in July whether someone could test his patch with a
compressed and an uncompressed .inv3 file. I did that today. I am also
attaching a shorter patch that I had prepared for the same problem, in
case it is useful to have both.

Setup: 3.1.99998-8 rebuilt with dpkg-buildpackage in a fresh debian:sid
container (amd64, Python 3.14.10), once with Christoph's
0011-fix-cve-2024-44825.patch as it is on his salsa repository today,
and once with the attached patch. Each build was installed in the
container and tested as an unprivileged user.

Both builds give the same results:

- debian/tests/run-unit-test passes.
- Cranium.inv3 from invesalius-examples is a tar.gz. I repacked it as a
  plain tar as well. Extract() returns the same 11 files with the same
  contents for both forms, and so does Extract_() for the tar.gz.
- "invesalius3 --no-gui <project> --export-project out.hdf5" works with
  both forms. The two HDF5 files are equal except for the export date.
- Four crafted projects write nothing outside of the destination
  directory: a member with "..", a member with an absolute name, a
  symlink followed by a member that goes through it, and a first member
  in an absolute directory. The unpatched code writes outside in three
  of the four cases. I ran that part with 3.1.99998-7 in trixie, whose
  project.py is identical to the one in -8.

The differences I see between the two patches:

- Christoph's patch checks the names itself and raises ValueError on the
  first unsafe member, so such a project is rejected as a whole. The
  attached one uses tarfile's "data" filter, the mechanism upstream uses
  (with tar_filter). It strips a leading "/" and extracts that member
  inside of the destination. For "..", for links that point outside and
  for special files it raises a tarfile.FilterError. The list of files
  that Extract() returns is built from the filtered members.
- The attached patch is smaller (11 lines added and 11 removed, against
  70 and 25), which may matter for a stable update. It needs Python 3.12
  or later. Unstable has 3.14 and trixie has 3.13.
- In Christoph's patch the helper within_dest() is defined but never
  called. The check that does the work is the abspath()/startswith() one
  further down, so this is only cosmetic.

As far as I can tell either one fixes the problem, so please take
whichever you prefer.

One more thing I noticed while testing: invesalius-bin 3.1.99998-8 from
the archive does not work in unstable at the moment. It ships its
extension modules only as cpython-313 and has no dependency on the
Python version, so with python3 3.14 "from invesalius_cy import
floodfill" fails with an ImportError. Both "invesalius3 --no-gui" on the
sample project and debian/tests/run-unit-test stop there, which would
explain the failing autopkgtest in the migration excuses. A rebuild is
enough (both test builds above work), so the next upload fixes it. I can
file it as a separate bug if that helps.

For trixie: 3.1.99998-7 is affected by this bug and by CVE-2024-42845
(#1082875, fixed in unstable in -8). Both are marked no-dsa. I have a
3.1.99998-7+deb13u1 debdiff with the two fixes, built and tested the
same way in a trixie container. Once this bug is fixed in unstable I
would like to propose it to the team for a point release, if that is
welcome.

Thanks,
Valentín Torassa

#1136204#53
Date:
2026-11-14 20:31:44 UTC
From:
To:
Hi,

A short follow-up to my message of 10 November with the test results
for both CVE-2024-44825 patches. Upstream has since fixed it in master
too, in commit 61e92e0 on 11
November:https://github.com/invesalius/invesalius3/commit/61e92e04f7d15686caad835f131e88f47635f0de
It uses tarfile's "data" filter and drops the unfiltered fallback,
which is also how the patch I attached works.

Which of the two would you prefer? I can open an MR with it as soon as
my salsa account is approved, or someone in the team could upload it
to unstable before then if that is quicker.

Thanks,
Valentín Torassa

#1136204#58
Date:
2026-11-14 21:45:06 UTC
From:
To:
Hi,

Am Sat, Nov 14, 2026 at 03:31:44PM -0500 schrieb valentintorassacolombero@gmail.com:

I think sticking closely to upstream is the easiest way to maintain.

Thanks a lot for your work on this
    Andreas.

#1136204#63
Date:
2026-11-15 13:08:02 UTC
From:
To:
Hi Andreas,

Thanks, agreed: I'll follow upstream. Their commit 61e92e0 uses tarfile's
"data" filter and drops the unfiltered fallback. My salsa account was
approved yesterday, so I'll open a merge request on the team's invesalius
repository with that fix as a DEP-3 patch and link it here.

Best,
Valentín

#1136204#66
Date:
2026-11-15 21:59:28 UTC
From:
To:
Hello,

Bug #1136204 in invesalius reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/med-team/invesalius/-/commit/fb13bf732ddb6303b90e19f932b6a30fe90cf929
Backport upstream commit 61e92e0, which extracts every member of a project with tarfile's "data" filter.
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1136204

#1136204#73
Date:
2026-11-15 22:06:50 UTC
From:
To:
Hi,

The merge request is up:
https://salsa.debian.org/med-team/invesalius/-/merge_requests/3

The changelog entry is UNRELEASED as 3.1.99998-9, ready for whoever
sponsors the upload.

Best,
Valentín

#1136204#76
Date:
2026-11-16 08:10:15 UTC
From:
To:
Hello,

Bug #1136204 in invesalius reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/med-team/invesalius/-/commit/fb13bf732ddb6303b90e19f932b6a30fe90cf929
Backport upstream commit 61e92e0, which extracts every member of a project with tarfile's "data" filter.
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1136204

#1136204#81
Date:
2026-11-16 09:49:01 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
invesalius, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1136204@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andreas Tille <tille@debian.org> (supplier of updated invesalius package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 16 Nov 2026 09:22:14 +0100
Source: invesalius
Architecture: source
Version: 3.1.99998-9
Distribution: unstable
Urgency: medium
Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Changed-By: Andreas Tille <tille@debian.org>
Closes: 1136204 1147757 1153854
Changes:
 invesalius (3.1.99998-9) unstable; urgency=medium
 .
   [ Valentín Torassa ]
   * fix-cve-2024-44825.patch: new: extract .inv3 projects with tarfile's
     "data" filter, as upstream does since 61e92e0. A crafted project file
     could otherwise write outside of the temporary project folder.
     (CVE-2024-44825, Closes: #1136204)
 .
   [ Andreas Tille ]
   * d/watch: version=5
   * Fix capitalization errors in lintian override comments.
   * Replace FSF postal address with a reference to
https://www.gnu.org/licenses/.
   * Depends: python3-six (which was introduced in d/p/11_add_auibar.patch)
     Closes: #1147757, #1153854
   * Reflow Uploaders field (cme)
Checksums-Sha1:
 0c1493b6c911a2e8661ba90cba0cda6df759d2ff 2345 invesalius_3.1.99998-9.dsc
 b832897531aaf90db77755070edf2595241ed583 38912 invesalius_3.1.99998-9.debian.tar.xz
 799121da7f147baaaf032d10dedadcf3e81cdcfc 8969 invesalius_3.1.99998-9_amd64.buildinfo
Checksums-Sha256:
 bac09bafaea77fae0723f99af9904b1a015ef31a9572cf90eabe5b3dc9d593af 2345 invesalius_3.1.99998-9.dsc
 bcdaf147a33e21c165c493eedb53b1925586b93271333db4eb3e27fbf91b99a4 38912 invesalius_3.1.99998-9.debian.tar.xz
 0d5e70918b2291157ad6ada4bc46527221ccb78284bb6eb73f5eececbd12be18 8969 invesalius_3.1.99998-9_amd64.buildinfo
Files:
 578e8b9757a48d034f478ad43a96c6bc 2345 graphics optional invesalius_3.1.99998-9.dsc
 e4a5d373a461ce832e91d13cf64e8c7f 38912 graphics optional invesalius_3.1.99998-9.debian.tar.xz
 2cf1c03deb82b677d20f065a84a89c27 8969 graphics optional invesalius_3.1.99998-9_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJFBAEBCgAvFiEE8fAHMgoDVUHwpmPKV4oElNHGRtEFAmr6zFIRHHRpbGxlQGRl
Ymlhbi5vcmcACgkQV4oElNHGRtGbkA/+OGQV7zE/k/go36MOTBnR8jnRPa6Fo1Bd
PXW1ii15Gygq40Y/EYO47Dil32CihPx1M4gy8Uy9MF1C+h/JeHrw6OROQf3mRKJd
pT2rqZAnoxIfFqa+ZbJ2BPPElenKq/2ly5Gnb9q9AYidTKg573xAGrgTdPEHrOMX
9Rx7ddRmV0N714oDy7FPMiF4nw1NLdrzLwAyWLh8yYab0aTKVxQjc+3fhhFkCACT
iX2jRCbFtIiGUMqXmy5dK0zYOzRL6tWY7QnZhcuVjJF8NJga+eZouIECCY9Qva23
dFkqPeEUw1hzS4yMsZ/5M046Yij/yxe6Df2CspSjx8XQFra1zBpzOayJglK3KepA
LvXQ1MaV8+GDe/xzvsfKAHgvhnopoMZ0IjjAMaxKm8hZ+13jNr1aN//DiYHEIpWc
gw74DvOfVTjqZxruTzxb6FFioX62JRIoioC7G1X9hiWJG9Qim1UKovNpIvwhwcZo
ie8z+o5l458g+yUmeY41Xm6ijCDcHYfs2umF1C7W3SKrLAq4qdSuP2+MHTuGIDzp
PvuFlpXNmu21tUr5Pihq1zwmVi3TJGrFDq9oYB0ew4W+1Hzn/SPkdshYBCCS6dd1
yEHX2gG5bPHDT2JP15ay32zZasUwrBb+5+YwucljvgHyVyIJ5a8ciInAzgP9u+bV
rU42iYQKE+I=
=3oJt
-----END PGP SIGNATURE-----