CVE-2020-27543

7.5 HIGH

📋 TL;DR

CVE-2020-27543 is a denial-of-service vulnerability in the restify-paginate Node.js package where omitting the HTTP Host header causes an uncaught exception, crashing the web service. This affects any Node.js application using restify-paginate version 0.0.5. The vulnerability allows remote attackers to disrupt service availability without authentication.

💻 Affected Systems

Products:
  • restify-paginate
Versions: Version 0.0.5 only
Operating Systems: All operating systems running Node.js
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications using restify-paginate 0.0.5 with Restify framework. Applications not using this specific package version are not vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service outage for all users of the affected web application, requiring manual restart of the Node.js process.

🟠

Likely Case

Intermittent service disruptions when attackers send crafted requests without Host headers, causing application crashes.

🟢

If Mitigated

Minimal impact if proper error handling is implemented or the application is behind a reverse proxy that validates headers.

🌐 Internet-Facing: HIGH - Remote attackers can easily craft HTTP requests without Host headers to trigger the crash.
🏢 Internal Only: MEDIUM - Internal attackers or misconfigured clients could still trigger the vulnerability, but attack surface is reduced.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires only sending HTTP requests without Host headers, which is trivial to automate. Public proof-of-concept code is available in GitHub repositories.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version 0.0.6 and later

Vendor Advisory: https://github.com/paulvarache/restify-paginate/

Restart Required: Yes

Instructions:

1. Update package.json to specify restify-paginate version ^0.0.6 or higher. 2. Run 'npm update restify-paginate' or 'npm install restify-paginate@latest'. 3. Restart the Node.js application.

🔧 Temporary Workarounds

Implement custom error handling middleware

all

Add middleware to catch uncaught exceptions from missing Host headers before they crash the application.

// In your Restify server setup:
server.use(function(req, res, next) {
  try {
    if (!req.headers.host) {
      res.send(400, 'Host header required');
      return;
    }
    next();
  } catch(err) {
    res.send(500, 'Internal server error');
  }
});

Use reverse proxy with header validation

linux

Configure a reverse proxy (nginx, Apache, etc.) to reject requests without Host headers before they reach the Node.js application.

# nginx configuration example:
server {
  listen 80;
  if ($http_host = '') {
    return 400;
  }
  # ... rest of configuration
}

🧯 If You Can't Patch

  • Deploy web application firewall (WAF) rules to block HTTP requests without Host headers
  • Implement rate limiting to reduce impact of repeated attack attempts

🔍 How to Verify

Check if Vulnerable:

Check package.json or node_modules/restify-paginate/package.json for version 0.0.5. Also test by sending HTTP request without Host header to see if application crashes.

Check Version:

npm list restify-paginate | grep restify-paginate

Verify Fix Applied:

After updating, verify restify-paginate version is 0.0.6 or higher using 'npm list restify-paginate'. Test with requests without Host headers - application should return error response instead of crashing.

📡 Detection & Monitoring

Log Indicators:

  • Uncaught exception logs mentioning 'TypeError' or 'Cannot read property' related to Host header
  • Application crash/restart logs without normal shutdown sequence
  • Increased error rate in application logs

Network Indicators:

  • HTTP requests without Host headers to Restify endpoints
  • Sudden spikes in HTTP 500 errors from the application

SIEM Query:

source="application.logs" AND ("uncaught exception" OR "TypeError") AND "Host"

🔗 References

📤 Share & Export