Common Weakness Enumeration

CWE-24

Allowed

Path Traversal: '../filedir'

Abstraction: Variant · Status: Incomplete

The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize "../" sequences that can resolve to a location that is outside of that directory.

187 vulnerabilities reference this CWE, most recent first.

GHSA-92W3-FMV4-JFF8

Vulnerability from github – Published: 2025-10-14 18:30 – Updated: 2025-10-14 21:30
VLAI
Details

A path traversal in StarNet Communications Corporation FastX v.4 through v4.1.51 allows unauthenticated attackers to read arbitrary files.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2025-57563"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-24"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-10-14T18:15:36Z",
    "severity": "MODERATE"
  },
  "details": "A path traversal in StarNet Communications Corporation FastX v.4 through v4.1.51 allows unauthenticated attackers to read arbitrary files.",
  "id": "GHSA-92w3-fmv4-jff8",
  "modified": "2025-10-14T21:30:44Z",
  "published": "2025-10-14T18:30:37Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-57563"
    },
    {
      "type": "WEB",
      "url": "https://gitlab.com/daniele_m/cve-list/-/blob/main/README.md?ref_type=heads"
    },
    {
      "type": "WEB",
      "url": "https://www.starnet.com/fastx"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-97M9-VJWC-7VR3

Vulnerability from github – Published: 2024-07-15 12:30 – Updated: 2024-07-15 12:30
VLAI
Details

A vulnerability classified as problematic was found in NaiboWang EasySpider 0.6.2 on Windows. Affected by this vulnerability is an unknown functionality of the file \EasySpider\resources\app\server.js of the component HTTP GET Request Handler. The manipulation with the input /../../../../../../../../../Windows/win.ini leads to path traversal: '../filedir'. The attack needs to be done within the local network. The exploit has been disclosed to the public and may be used. The identifier VDB-271477 was assigned to this vulnerability. NOTE: The code maintainer explains, that this is not a big issue "because the default is that the software runs locally without going through the Internet".

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-6746"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22",
      "CWE-24"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-07-15T12:15:02Z",
    "severity": "MODERATE"
  },
  "details": "A vulnerability classified as problematic was found in NaiboWang EasySpider 0.6.2 on Windows. Affected by this vulnerability is an unknown functionality of the file \\EasySpider\\resources\\app\\server.js of the component HTTP GET Request Handler. The manipulation with the input /../../../../../../../../../Windows/win.ini leads to path traversal: \u0027../filedir\u0027. The attack needs to be done within the local network. The exploit has been disclosed to the public and may be used. The identifier VDB-271477 was assigned to this vulnerability. NOTE: The code maintainer explains, that this is not a big issue \"because the default is that the software runs locally without going through the Internet\".",
  "id": "GHSA-97m9-vjwc-7vr3",
  "modified": "2024-07-15T12:30:39Z",
  "published": "2024-07-15T12:30:39Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-6746"
    },
    {
      "type": "WEB",
      "url": "https://github.com/NaiboWang/EasySpider/issues/466"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?ctiid.271477"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?id.271477"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?submit.371998"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:N/VC:L/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",
      "type": "CVSS_V4"
    }
  ]
}

GHSA-97Q5-QF47-HVRW

Vulnerability from github – Published: 2026-04-16 18:31 – Updated: 2026-06-30 03:36
VLAI
Details

In OCaml opam before 2.5.1, a .install field containing a destination filepath can use ../ to reach a parent directory.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-41082"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22",
      "CWE-24"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-04-16T18:16:45Z",
    "severity": "HIGH"
  },
  "details": "In OCaml opam before 2.5.1, a .install field containing a destination filepath can use ../ to reach a parent directory.",
  "id": "GHSA-97q5-qf47-hvrw",
  "modified": "2026-06-30T03:36:17Z",
  "published": "2026-04-16T18:31:22Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-41082"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ocaml/opam/pull/6897"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/security/cve/CVE-2026-41082"
    },
    {
      "type": "WEB",
      "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2459003"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ocaml/opam/releases/tag/2.5.1"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2026/04/msg00021.html"
    },
    {
      "type": "WEB",
      "url": "https://osv.dev/vulnerability/OSEC-2026-03"
    },
    {
      "type": "WEB",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-41082.json"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-9FV2-C7V6-P45W

Vulnerability from github – Published: 2026-03-05 21:30 – Updated: 2026-03-06 22:46
VLAI
Summary
Fonoster is vulnerable to directory traversal
Details

Fonoster 0.5.5 before 0.6.1 allows ../ directory traversal to read arbitrary files via the /sounds/:file or /tts/:file VoiceServer endpoint. This occurs in serveFiles in mods/voice/src/utils.ts. NOTE: serveFiles exists in 0.5.5 but not in the next release, 0.6.1.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "@fonoster/voice"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.5.5"
            },
            {
              "fixed": "0.6.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2024-43035"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-24"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-06T22:46:28Z",
    "nvd_published_at": "2026-03-05T20:16:09Z",
    "severity": "MODERATE"
  },
  "details": "Fonoster 0.5.5 before 0.6.1 allows ../ directory traversal to read arbitrary files via the /sounds/:file or /tts/:file VoiceServer endpoint. This occurs in serveFiles in mods/voice/src/utils.ts. NOTE: serveFiles exists in 0.5.5 but not in the next release, 0.6.1.",
  "id": "GHSA-9fv2-c7v6-p45w",
  "modified": "2026-03-06T22:46:29Z",
  "published": "2026-03-05T21:30:48Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-43035"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/fonoster/fonoster"
    },
    {
      "type": "WEB",
      "url": "https://github.com/fonoster/fonoster/blob/4a1438d9dedeaf7b2a5b6a50d5e233f994e2b2cf/mods/voice/src/utils.ts#L66-L70"
    },
    {
      "type": "WEB",
      "url": "https://zeropath.com/blog/fonoster-voiceserver-lfi-vulnerability"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Fonoster is vulnerable to directory traversal"
}

GHSA-9QRP-H7FW-42HG

Vulnerability from github – Published: 2022-06-01 19:56 – Updated: 2022-06-01 19:56
VLAI
Summary
Path Traversal in XWiki Platform
Details

Impact

One can ask for any file located in the classloader using the template API and a path with ".." in it. For example

{{template name="../xwiki.hbm.xml"/}}

To our knownledge none of the available files of the classloader in XWiki Standard contain any strong confidential data, hence the low confidentiality value of this advisory.

Patches

The issue is patched in versions 14.0 and 13.10.3.

Workarounds

There's no easy workaround for this issue, administrators should upgrade their wiki.

References

  • https://jira.xwiki.org/browse/XWIKI-19349
  • https://github.com/xwiki/xwiki-platform/commit/4917c8f355717bb636d763844528b1fe0f95e8e2

For more information

If you have any questions or comments about this advisory: * Open an issue in Jira XWiki * Email us at security mailing list

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.xwiki.platform:xwiki-platform-oldcore"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "8.3-rc-1"
            },
            {
              "fixed": "13.10.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2022-29253"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22",
      "CWE-24"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2022-06-01T19:56:34Z",
    "nvd_published_at": "2022-05-25T21:15:00Z",
    "severity": "LOW"
  },
  "details": "### Impact\n\nOne can ask for any file located in the classloader using the template API and a path with \"..\" in it. For example \n\n```\n{{template name=\"../xwiki.hbm.xml\"/}}\n```\n\nTo our knownledge none of the available files of the classloader in XWiki Standard contain any strong confidential data, hence the low confidentiality value of this advisory.\n\n### Patches\n\nThe issue is patched in versions 14.0 and 13.10.3.\n\n### Workarounds\n\nThere\u0027s no easy workaround for this issue, administrators should upgrade their wiki.\n\n### References\n\n * https://jira.xwiki.org/browse/XWIKI-19349\n * https://github.com/xwiki/xwiki-platform/commit/4917c8f355717bb636d763844528b1fe0f95e8e2\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [Jira XWiki](https://jira.xwiki.org)\n* Email us at [security mailing list](mailto:security@xwiki.org)",
  "id": "GHSA-9qrp-h7fw-42hg",
  "modified": "2022-06-01T19:56:34Z",
  "published": "2022-06-01T19:56:34Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-9qrp-h7fw-42hg"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-29253"
    },
    {
      "type": "WEB",
      "url": "https://github.com/xwiki/xwiki-platform/commit/4917c8f355717bb636d763844528b1fe0f95e8e2"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/xwiki/xwiki-platform"
    },
    {
      "type": "WEB",
      "url": "https://jira.xwiki.org/browse/XWIKI-19349"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Path Traversal in XWiki Platform"
}

GHSA-C52G-PQ8X-MVMM

Vulnerability from github – Published: 2024-09-04 15:30 – Updated: 2024-09-04 15:30
VLAI
Details

A vulnerability classified as problematic has been found in ABCD ABCD2 up to 2.2.0-beta-1. This affects an unknown part of the file /common/show_image.php. The manipulation of the argument image leads to path traversal: '../filedir'. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-8409"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22",
      "CWE-24"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-09-04T15:15:14Z",
    "severity": "MODERATE"
  },
  "details": "A vulnerability classified as problematic has been found in ABCD ABCD2 up to 2.2.0-beta-1. This affects an unknown part of the file /common/show_image.php. The manipulation of the argument image leads to path traversal: \u0027../filedir\u0027. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.",
  "id": "GHSA-c52g-pq8x-mvmm",
  "modified": "2024-09-04T15:30:36Z",
  "published": "2024-09-04T15:30:36Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-8409"
    },
    {
      "type": "WEB",
      "url": "https://github.com/peritocibernetico/ABCD_Vulnerabilities"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?ctiid.276489"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?id.276489"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/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",
      "type": "CVSS_V4"
    }
  ]
}

GHSA-CFPX-F979-XM8V

Vulnerability from github – Published: 2024-03-22 21:30 – Updated: 2024-03-22 21:30
VLAI
Details

A vulnerability classified as critical has been found in lakernote EasyAdmin up to 20240315. This affects an unknown part of the file /ureport/designer/saveReportFile. The manipulation of the argument file leads to path traversal: '../filedir'. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. The associated identifier of this vulnerability is VDB-257715.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-2825"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-24"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-03-22T19:15:08Z",
    "severity": "MODERATE"
  },
  "details": "A vulnerability classified as critical has been found in lakernote EasyAdmin up to 20240315. This affects an unknown part of the file /ureport/designer/saveReportFile. The manipulation of the argument file leads to path traversal: \u0027../filedir\u0027. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. The associated identifier of this vulnerability is VDB-257715.",
  "id": "GHSA-cfpx-f979-xm8v",
  "modified": "2024-03-22T21:30:56Z",
  "published": "2024-03-22T21:30:56Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-2825"
    },
    {
      "type": "WEB",
      "url": "https://gitee.com/lakernote/easy-admin/issues/I98ZTA"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?ctiid.257715"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?id.257715"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-CHJ6-X555-WH22

Vulnerability from github – Published: 2025-04-11 00:31 – Updated: 2025-04-11 00:31
VLAI
Details

A path traversal vulnerability in FusionDirectory before 1.5 allows remote attackers to read arbitrary files on the host that end with .png (and .svg or .xpm for some configurations) via the icon parameter of a GET request to geticon.php.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2025-32807"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-24"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-04-11T00:15:27Z",
    "severity": "MODERATE"
  },
  "details": "A path traversal vulnerability in FusionDirectory before 1.5 allows remote attackers to read arbitrary files on the host that end with .png (and .svg or .xpm for some configurations) via the icon parameter of a GET request to geticon.php.",
  "id": "GHSA-chj6-x555-wh22",
  "modified": "2025-04-11T00:31:35Z",
  "published": "2025-04-11T00:31:35Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-32807"
    },
    {
      "type": "WEB",
      "url": "https://gitlab.fusiondirectory.org/fusiondirectory/fd/-/blob/e9304844fb5c8ce4a9af9e26858af5e22e15b9bd/Changelog.md?plain=1#L112"
    },
    {
      "type": "WEB",
      "url": "https://gitlab.fusiondirectory.org/fusiondirectory/fd/-/blob/e9304844fb5c8ce4a9af9e26858af5e22e15b9bd/include/class_IconTheme.inc#L233-237"
    },
    {
      "type": "WEB",
      "url": "https://gitlab.fusiondirectory.org/fusiondirectory/fd/-/commit/9edefd0b367450d665a141c5e94db8a06d208556"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-CJX4-RQCR-JJMH

Vulnerability from github – Published: 2025-08-04 18:30 – Updated: 2025-11-03 21:34
VLAI
Details

RUCKUS SmartZone (SZ) before 6.1.2p3 Refresh Build allows ../ directory traversal to read files.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2025-44962"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-24"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-08-04T17:15:30Z",
    "severity": "MODERATE"
  },
  "details": "RUCKUS SmartZone (SZ) before 6.1.2p3 Refresh Build allows ../ directory traversal to read files.",
  "id": "GHSA-cjx4-rqcr-jjmh",
  "modified": "2025-11-03T21:34:19Z",
  "published": "2025-08-04T18:30:37Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-44962"
    },
    {
      "type": "WEB",
      "url": "https://claroty.com/team82/disclosure-dashboard/cve-2025-44962"
    },
    {
      "type": "WEB",
      "url": "https://kb.cert.org/vuls/id/613753"
    },
    {
      "type": "WEB",
      "url": "https://webresources.commscope.com/download/assets/FAQ+Security+Advisory%3A+ID+20250710/225f44ac3bd311f095821adcaa92e24e"
    },
    {
      "type": "WEB",
      "url": "https://www.kb.cert.org/vuls/id/613753"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-CPVJ-QFC6-RJVX

Vulnerability from github – Published: 2025-10-21 15:31 – Updated: 2025-10-21 21:33
VLAI
Details

An unauthenticated Local File Inclusion (LFI) vulnerability in D-Link DSR series routers allows remote attackers to retrieve sensitive configuration files in clear text. The exposed files contain administrative credentials, VPN settings, and other sensitive information, enabling full administrative access to the router. Affected Products include: DSR-150, DSR-150N, and DSR-250N v1.09B32_WW.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2025-60344"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-200",
      "CWE-24"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-10-21T15:15:39Z",
    "severity": "MODERATE"
  },
  "details": "An unauthenticated Local File Inclusion (LFI) vulnerability in D-Link DSR series routers allows remote attackers to retrieve sensitive configuration files in clear text. The exposed files contain administrative credentials, VPN settings, and other sensitive information, enabling full administrative access to the router. Affected Products include: DSR-150, DSR-150N, and DSR-250N v1.09B32_WW.",
  "id": "GHSA-cpvj-qfc6-rjvx",
  "modified": "2025-10-21T21:33:37Z",
  "published": "2025-10-21T15:31:00Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-60344"
    },
    {
      "type": "WEB",
      "url": "https://github.com/fyoozr/D-Link-DSR-N250-LFI-Vulnerability"
    },
    {
      "type": "WEB",
      "url": "https://github.com/fyoozr/vulnerability-research/tree/main/CVE-2025-60344"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H",
      "type": "CVSS_V3"
    }
  ]
}

Mitigation MIT-5.1
Implementation

Strategy: Input Validation

  • Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
  • When validating filenames, use stringent allowlists that limit the character set to be used. If feasible, only allow a single "." character in the filename to avoid weaknesses such as CWE-23, and exclude directory separators such as "/" to avoid CWE-36. Use a list of allowable file extensions, which will help to avoid CWE-434.
  • Do not rely exclusively on a filtering mechanism that removes potentially dangerous characters. This is equivalent to a denylist, which may be incomplete (CWE-184). For example, filtering "/" is insufficient protection if the filesystem also supports the use of "\" as a directory separator. Another possible error could occur when the filtering is applied in a way that still produces dangerous data (CWE-182). For example, if "../" sequences are removed from the ".../...//" string in a sequential fashion, two instances of "../" would be removed from the original string, but the remaining characters would still form the "../" string.
Mitigation MIT-20
Implementation

Strategy: Input Validation

Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.

No CAPEC attack patterns related to this CWE.