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.

  • bort@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    82
    ·
    1 year ago

    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.

  • Lem453@lemmy.ca
    link
    fedilink
    English
    arrow-up
    14
    ·
    1 year ago

    If i remember correctly on my gitea (now forgejo) the default is open registration which really shouldn’t be the case for projects that are targeted towards self hosters.

    My inital install was a long time ago so I don’t remember for sure

    • Encrypt-Keeper@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      Reading between the lines I feel like when you say “Targeted towards self hosters” what you mean is “John Q Hobbyist who doesn’t know any better”

      And in response to that I would contend that Gitea is not actually targeted at those folks, though they obviously use it. Gitea is FOSS but it’s still “targeted” at professionals.

    • Jason2357@lemmy.ca
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      This absolutely. Anyone who actually wants open registration will be configuring their own SSO or whatever backend. The default should be safe for testing and/or hobbyists.

  • GreenKnight23@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    2
    ·
    1 year ago

    this is what I’m talking about when it comes to the selfhosted communities.

    if you don’t know how to properly segment and vlan your network, you have no business exposing your shit to the internet.

    • Jason2357@lemmy.ca
      link
      fedilink
      English
      arrow-up
      10
      ·
      1 year ago

      While good, network security isnt the issue. Its running a web service with open registration allowing randos to upload content that gets processed by the server.

      Throw this up on a dedicated $5 VPS and you still have a problem. The default should be manual registration by admins.