Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🦀 crates.io
Not in CISA KEV

GHSA-3227-r97m-8j95 — afire

Fix: Basicprogrammer10/afire@da7904c

GHSA-3227-r97m-8j95 is a security vulnerability in afire. A fix is available for afire — see the affected versions and patch details below.

Relative Path Traversal in afire serve_static

Published
Apr 22, 2022
Updated
Apr 22, 2022
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Apr 22, 2022 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected
🦀afire

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.

Description

Impact

This vulnerability effects the built-in afire serve_static extension allowing paths containing //.... to bypass the previous path sanitation and request files in higher directories that should not be accessible.

Patches

The issue has been fixed in afire 1.1.0. If you can, just update to the newest version of afire.

Workarounds

If you can't update afire you can simply disallow paths containing /.. with the following middleware. Make sure this is the last middleware added to the server so it runs first, stopping the bad requests.

use afire::prelude::*;

struct PathTraversalFix;

impl Middleware for PathTraversalFix {
    fn pre(&self, req: Request) -> MiddleRequest {
        if req.path.replace("\\", "/").contains("/..") {
            return MiddleRequest::Send(
                Response::new()
                    .status(400)
                    .text("Paths containing `..` are not allowed"),
            );
        }

        MiddleRequest::Continue
    }
}
let mut server = Server::new(host, port);
PathTraversalFix.attach(&mut server);

References

You can read about the new changes to afire in 1.1.0 here

For more information

If you have any questions or comments about this advisory you can email me or message me on discord. [https://connorcode.com/contact]

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🦀crates.ioafire≥ 0.2.1&&< 1.1.01.1.0cargo update -p afire --precise 1.1.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for afire, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update afire to 1.1.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-3227-r97m-8j95 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-3227-r97m-8j95 can be triaged on real exposure rather than presence alone.

Tailored to GHSA-3227-r97m-8j95. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Impact This vulnerability effects the built-in afire serve_static extension allowing paths containing `//....` to bypass the previous path sanitation and request files in higher directories that should not be accessible. ### Patches The issue has been fixed in [afire 1.1.0](https://crates.io/crates/afire/1.1.0). If you can, just update to the newest version of afire. ### Workarounds If you can't update afire you can simply disallow paths containing `/..` with the following middleware. Make sure this is the last middleware added to the server so it runs first, stopping the bad requests. `
O3 Security · Impact-Aware SCA

Is GHSA-3227-r97m-8j95 in your dependencies?

O3 Security finds GHSA-3227-r97m-8j95 across crates.io dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

GHSA-3227-r97m-8j95: afire | O3 Security