Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. Oh look, path traversal meets vibe coding

Oh look, path traversal meets vibe coding

Scheduled Pinned Locked Moved Uncategorized
4 Posts 2 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • brauner@mastodon.socialB This user is from outside of this forum
    brauner@mastodon.socialB This user is from outside of this forum
    brauner@mastodon.social
    wrote last edited by
    #1

    RE: https://cyberplace.social/@GossiTheDog/116080909947754833

    Oh look, path traversal meets vibe coding.
    Everyone should know that path traversal is like the easiest thing to get right. It's famously trivial. Not like we've been plagued by security issues. Imagine if Linux had symlinks or heaven forbid magic links. Oh well.

    dascandy@infosec.exchangeD 1 Reply Last reply
    0
    • brauner@mastodon.socialB brauner@mastodon.social

      RE: https://cyberplace.social/@GossiTheDog/116080909947754833

      Oh look, path traversal meets vibe coding.
      Everyone should know that path traversal is like the easiest thing to get right. It's famously trivial. Not like we've been plagued by security issues. Imagine if Linux had symlinks or heaven forbid magic links. Oh well.

      dascandy@infosec.exchangeD This user is from outside of this forum
      dascandy@infosec.exchangeD This user is from outside of this forum
      dascandy@infosec.exchange
      wrote last edited by
      #2

      @brauner what is the colloquially correct way? I have one but would love to hear from others that have done this before.

      brauner@mastodon.socialB 1 Reply Last reply
      0
      • dascandy@infosec.exchangeD dascandy@infosec.exchange

        @brauner what is the colloquially correct way? I have one but would love to hear from others that have done this before.

        brauner@mastodon.socialB This user is from outside of this forum
        brauner@mastodon.socialB This user is from outside of this forum
        brauner@mastodon.social
        wrote last edited by
        #3

        @dascandy There's #systemd's chase()/chaseat() [1] and @cyphar 's #libpathrs [2]. Both are pretty good and cover a lot of edge cases.

        [1]: https://github.com/systemd/systemd/blob/main/src/basic/chase.c
        [2]: https://github.com/cyphar/libpathrs/?tab=readme-ov-file

        dascandy@infosec.exchangeD 1 Reply Last reply
        0
        • brauner@mastodon.socialB brauner@mastodon.social

          @dascandy There's #systemd's chase()/chaseat() [1] and @cyphar 's #libpathrs [2]. Both are pretty good and cover a lot of edge cases.

          [1]: https://github.com/systemd/systemd/blob/main/src/basic/chase.c
          [2]: https://github.com/cyphar/libpathrs/?tab=readme-ov-file

          dascandy@infosec.exchangeD This user is from outside of this forum
          dascandy@infosec.exchangeD This user is from outside of this forum
          dascandy@infosec.exchange
          wrote last edited by
          #4

          @cyphar @brauner I tried to first canonicalize the path (resolve symlinks, remove ./ and ../) and then check if the resulting path is still a subpath of the target root. I can see a few ways it differs from these two, but I don't know if those are security issues?

          1 Reply Last reply
          1
          0
          • R relay@relay.infosec.exchange shared this topic
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups