org.webjars.npm:proxy-addr@2.0.7

  • latest version

    2.0.7

  • latest non vulnerable version

  • first published

    11 years ago

  • latest version published

    5 years ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the org.webjars.npm:proxy-addr package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • C
    User Impersonation

    Affected versions of this package are vulnerable to User Impersonation in its subnet matching logic, where an IPv4-mapped IPv6 trust entry with a short prefix such as ::ffff:10.0.0.0/8 compiles with all-zero leading bits and matches every address rather than the intended block. An attacker can control the value returned by proxyaddr(req, trust), and therefore req.ip and req.ips in Express, by sending an arbitrary X-Forwarded-For header, since every client is then trusted as a proxy at hop 0, which defeats IP-based access control, rate limiting, geolocation, and audit logging. This requires the application to configure its trust list with an IPv4-mapped IPv6 subnet using a short prefix, or any IPv6 subnet with zero leading bits such as ::/1, and the misconfiguration compiles without error.

    How to fix User Impersonation?

    A fix was pushed into the master branch but not yet published.

    [1.1.2,)