Language: JavaScript
Label: vulnerable
CWE: CWE-918 \u2014 Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.

Code:
        function HeadersPolyfill(all) {
          var map = /* @__PURE__ */ Object.create(null);
          var array = all.split("\r\n");
          for (var i2 = 0; i2 < array.length; i2 += 1) {
            var line = array[i2];
            var parts = line.split(": ");
            var name = parts.shift();
            var value = parts.join(": ");
            map[toLowerCase(name)] = value;
          }
          this._map = map;
        }