CWE-777
AllowedRegular Expression without Anchors
Abstraction: Variant · Status: Incomplete
The product uses a regular expression to perform neutralization, but the regular expression is not anchored and may allow malicious or malformed data to slip through.
11 vulnerabilities reference this CWE, most recent first.
GHSA-XV5F-QCMP-V8W2
Vulnerability from github – Published: 2026-10-31 15:30 – Updated: 2026-11-06 15:31WebDyne versions from 2.031 before 3.022 for Perl execute files with .psp anywhere in the name as Perl pages.
WebDyne decides whether to run a requested file as a page by matching its name against WEBDYNE_PSP_EXT_RE, which has no end anchor.
An application that accepts uploads by checking only the final extension lets a remote attacker upload a file such as report.psp.pdf and run its embedded Perl by requesting it.
{
"affected": [],
"aliases": [
"CVE-2026-78191"
],
"database_specific": {
"cwe_ids": [
"CWE-777"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-10-31T15:16:54Z",
"severity": "CRITICAL"
},
"details": "WebDyne versions from 2.031 before 3.022 for Perl execute files with .psp anywhere in the name as Perl pages.\n\nWebDyne decides whether to run a requested file as a page by matching its name against WEBDYNE_PSP_EXT_RE, which has no end anchor.\n\nAn application that accepts uploads by checking only the final extension lets a remote attacker upload a file such as report.psp.pdf and run its embedded Perl by requesting it.",
"id": "GHSA-xv5f-qcmp-v8w2",
"modified": "2026-11-06T15:31:20Z",
"published": "2026-10-31T15:30:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-78191"
},
{
"type": "WEB",
"url": "https://metacpan.org/release/ASPEER/WebDyne-3.022/changes"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation
Be sure to understand both what will be matched and what will not be matched by a regular expression. Anchoring the ends of the expression will allow the programmer to define an allowlist strictly limited to what is matched by the text in the regular expression. If you are using a package that only matches one line by default, ensure that you can match multi-line inputs if necessary.
No CAPEC attack patterns related to this CWE.