http-proxy-middleware
http-proxy-middleware, Node.js прокси аралық бағдарламасы, оның алдында дене талдағышы жұмыс істеген кезде бэкендке шабуылдаушы жазған екінші HTTP сұранысын жібере алады. Аутентификациясыз қашықтағы шабуылдаушы мұны бэкендтің шлюздің маршруттық сүзгілеуін, /admin бұғаттауын және сенімді тақырыптарды нормалауын айналып өтетін ерікті сұранысты орындауына мәжбүрлеу үшін пайдалана алады.
Түйіндемені дереккөздер негізінде ЖИ жасаған және ол автоматты түрде аударылған.
Түзетілген нұсқалар: 2.0.113.0.84.2.1
| http-proxy-middleware | бастап 2.0.9 → түзетілді 2.0.11 бастап 3.0.5 → түзетілді 3.0.8 бастап 4.0.0-beta.0 → түзетілді 4.2.1 |
| http-proxy-middlewarenpm | бастап 4.0.0-beta.0 дейін 4.2.0 |
| http-proxy-middlewarenpm | бастап 3.0.5 дейін 3.0.7 |
| http-proxy-middlewarenpm | бастап 2.0.9 дейін 2.0.10 |
Түпнұсқа тақырып: http-proxy-middleware request smuggling in proxy bypasses route filtering
http-proxy-middleware is node.js http-proxy middleware. From 2.0.9 until 2.0.11, 3.0.8, and 4.2.1, fixRequestBody treats req.readableLength === 0 as proof that a body parser consumed the request body, although zero buffered bytes can also mean that the body has not arrived. The required conditions are that a body-parser 1.x parser runs before the proxy, declines a declared media type that fixRequestBody recognizes for reconstruction after assigning a truthy req.body, and leaves the request stream unread; fixRequestBody is registered as on.proxyReq; the body arrives after the headers; the upstream connection remains persistent; and no front end completely buffers and reframes the request. The middleware then writes a synthesized body before the original bytes are piped upstream, allowing a remote unauthenticated client to make the backend execute an arbitrary HTTP/1.1 request that bypasses the gateway's route filter, explicit /admin denial, and trusted-header normalization. With a pooled upstream connection, an attacker-controlled following request can also receive the smuggled response. Body-parser 2.x, a matching parser that consumes the request, no parser, an unsupported media type that fixRequestBody does not serialize, and a nonpersistent upstream connection are not affected by this mechanism. This issue is fixed in repository releases 2.0.11, 3.0.8, and 4.2.1.