this post was submitted on 10 Dec 2025
443 points (99.6% liked)

Selfhosted

53652 readers
1106 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

  7. No low-effort posts. This is subjective and will largely be determined by the community member reports.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

By 'Git instances' they mean Gogs instances that allow open registration. I know most of the community moved from Gogs to Gitea, and then to Forgejo, but thought this was still worth noting.

you are viewing a single comment's thread
view the rest of the comments
[–] bort@sopuli.xyz 116 points 4 days ago (6 children)

Here are the steps:

  • The attacker creates a standard Git repository.
  • They commit a single symbolic link pointing to a sensitive target.
  • Using the PutContents API, they write data to the symlink. The system follows the link and overwrites the target file outside the repository.
  • By overwriting .git/config (specifically the sshCommand), the attacker can force the system to execute arbitrary commands--

amazing.

[–] addie@feddit.uk 28 points 4 days ago (5 children)

Especially since any version of Git from the last view years has a passionate hatred of symlinks for this reason, which is a bit annoying if you've a legit usecase. They're either very out-of-date, or have done some very foolish customisation...

[–] JackbyDev@programming.dev 2 points 3 days ago (4 children)

I think the ZIP standard has something similar and it causes similar problems.

[–] PlexSheep@infosec.pub 8 points 3 days ago (1 children)

It's because of the old notion of "be generous in what you accept and strict in what you send". I think the error is something about adding more parent directories so that part of your zip file will be extracted above the selected directory. Not all implementations of zip support this "feature".

There are also all kinds of stupid ancient features in tar and zip from a time when hard drives were measured in megabytes or less. The latest episode of the open source security podcast talks about it.

[–] Jason2357@lemmy.ca 3 points 3 days ago (2 children)

We also have COW filesystems now. If you need large datasets in different places, used by different projects, etc, just copy them and use BTRFS or ZFS or whatever. It wont take any space and be safer. Git also has multiple ways of connecting external data artifacts. Git should by default reject symlinks.

[–] The_Decryptor@aussie.zone 2 points 3 days ago

Git itself (Or any other VCS for that matter) really should treat symlinks as special, similar as to how btrfs stores everything as "reflinks" internally. They be stored as special references to other tracked objects (so it'd be impossible to commit a symlink that pointed at anything other than a checked-in file, and ensure they always match), and git can materialise them as needed.

[–] PlexSheep@infosec.pub 1 points 2 days ago

This is sadly not easily generalizable, since a lot of people still use legacy operating systems with filesystems like NTFS, which as far as I know is not COW.

load more comments (2 replies)
load more comments (2 replies)
load more comments (2 replies)