Lucene search

K
huntr1esvee1C2BC65AF-7B93-4020-886E-8CDAEB0A58EA
HistorySep 10, 2021 - 7:09 p.m.

in getgrav/grav

2021-09-1019:09:36
1esvee1
www.huntr.dev
5
cookie path vulnerability
cross-application access
sensitive information compromise

EPSS

0.001

Percentile

38.8%

✍️ Description

Developers often set cookies to be accessible from the root context path (“/”). Doing so exposes the cookie to all web applications on the domain. Since cookies often carry sensitive information such as session identifiers, sharing cookies across applications can lead a vulnerability in one application to cause a compromise in another.

🕵️‍♂️ Proof of Concept

  public function setFlashCookieObject($name, $object, $time = 60)
    {
        setcookie($name, json_encode($object), time() + $time, '/');

        return $this;
    }
 {
        if (isset($_COOKIE[$name])) {
            $object = json_decode($_COOKIE[$name], false);
            setcookie($name, '', time() - 3600, '/');
            return $object;
        }

💥 Impact

A cookie with an overly broad path can be accessed through other applications on the same domain.

EPSS

0.001

Percentile

38.8%

Related for C2BC65AF-7B93-4020-886E-8CDAEB0A58EA