scanrub
Insufficiently Protected Credentialsmedium prioritypartial coverage

Insufficiently Protected Credentials

2 min read 30 reports analyzed ScanRub Research
Share

Summary

Reports cluster around:

  • curl/libcurl bugs that leak Authorization / Cookie / Proxy-Authorization / FTP-USER credentials when following redirects across hosts/protocols (CVE-2018-1000007, CVE-2021-22923, CVE-2022-27774, CVE-2022-27776)
  • staging/test app accepting default credentials
  • IDOR or low-permission endpoint leaking enough info (username) to feed brute force
  • library-shipped vulnerable dep (moment-timezone) exposing data
  • HSTS bypass via IDN or trailing-dot enabling downgrade attacks. Most are CVE markers; the staging-app-default-creds pattern overlaps with auth synthesis.
◈ flow diagram
Source Code …Hard-Coded S…Direct Authe…Protected Sy…
◈ chart
Critical
2
High
8
Medium
13
Low
8

Top Affected Components / Targets

  • Apps using curl/libcurl with redirects
  • Staging / dev deployments accidentally exposed
  • HSTS-protected hosts vulnerable to IDN bypass

Common Attack Vectors

  • Set up a redirect that downgrades https -> http or routes to ftp://; observe credential leak
  • Try default creds (admin/admin, test/test, root/root) on staging hosts
  • Probe IDN trailing-dot variations to bypass HSTS

Common Payloads

  • https://target/redirect -> http://attacker:9999/
  • admin/admin, root/root, test/test, demo/demo
  • http://target.com。 (IDN trailing dot)

Detection Strategy

Stage 1: CVE marker

Compose with Nuclei for curl CVE-2022-27774, CVE-2022-27776, CVE-2021-22923, CVE-2022-30115, CVE-2022-42916.

Stage 2: default-creds probe

On detected admin login pages, attempt the small default-creds dictionary; emit critical when accepted.

Stage 3: HSTS audit

For HSTS-protected hosts, probe IDN trailing-dot variant and observe whether HSTS is bypassed.

Tip: Testing tools that run these checks in parallel across every discovered endpoint can cut the time required substantially compared to fully manual testing, as long as they confirm findings with more than one signal to keep the false-positive rate down.

False-Positive Notes

Default-creds testing must be rate-limited and only against detected admin panels - never against arbitrary login forms.

How to Test

Manual Testing Methodology

Here is a systematic approach to identifying Insufficiently Protected Credentials vulnerabilities in a target application.

Step 1: Reconnaissance and Surface Mapping

Before testing, map all input vectors that could be affected. Identify parameters, headers, cookies, and request bodies that interact with the vulnerable component. A proxy such as Burp Suite or OWASP ZAP, paired with normal browsing of the target, is usually enough to build this list.

Step 2: Baseline Request

Send a legitimate request and record the normal response: status code, content length, response time, and any identifying tokens. This baseline matters because it's what you'll compare later responses against once payloads are involved.

Step 3: Payload Injection

Inject test payloads into each identified input vector one at a time. Start with benign detection payloads before escalating to anything that could actually trigger the vulnerability. For Insufficiently Protected Credentials specifically, search publicly reachable source (client-side JS bundles, mobile app binaries, public repositories, exposed .git directories) for API keys, connection strings, and hard-coded passwords, and separately try any vendor-published default credentials against the target's login and admin interfaces.

Step 4: Response Analysis

Compare the response against your baseline, looking specifically for a live credential or key found in source that successfully authenticates against the corresponding service, or a default credential pair that logs in without being changed.

Step 5: Confirmation

Once a potential vulnerability is detected, confirm it with at least a few independent test cases to rule out coincidence. Document the exact request and response as proof. For Insufficiently Protected Credentials, a confirmed finding typically means showing that attacker-controlled input changes the application's behavior in a way that matters for security, not just that a payload was reflected somewhere harmless.

Real-World Impact

Real-World Impact

Hard-coded and weakly-protected credentials give an attacker a direct path to whatever the credential guards — a database, an internal API, a cloud account, or the application itself — without needing to find or exploit a code-level bug at all. A secret committed to source control remains exploitable even after it's later removed, since it persists in git history indefinitely unless the repository is actively scrubbed and the credential rotated.

Default credentials left in place after deployment are a perennial finding for exactly the same reason: they require no discovery beyond checking the vendor's published defaults, and they're routinely still valid in production.

Weakly hashed or reversibly "encrypted" passwords compound the damage of any other breach — a database dump that would otherwise only expose hashes needing significant offline cracking effort instead hands over plaintext-equivalent credentials immediately, and because of password reuse, that damage extends well beyond the breached application itself.

Prevention & Remediation

Prevention and Secure Coding

Preventing Insufficiently Protected Credentials takes a defense-in-depth approach — no single control below is sufficient alone, but together they close off both the primary path and the most common bypasses.

Secrets manager, not source control. Store credentials, API keys, and cryptographic keys in a dedicated secrets manager (Vault, cloud KMS, or equivalent) and inject them at runtime — never commit them to a repository, config file, or container image.

Rotate anything ever exposed. A credential that was ever committed, even briefly, should be treated as compromised and rotated — removing it from the latest commit does not remove it from history.

No shipped default credentials. Force a credential-setup step on first run rather than shipping a default username/password that some deployments will never change.

Modern password hashing, always. Hash passwords with bcrypt, scrypt, or Argon2 with a per-user salt — never store them in plaintext or with reversible encryption, and never with an unsalted or fast general-purpose hash like unsalted SHA-256.

Automated secret-scanning in CI. A pre-commit or CI secret-scanner catches an accidental credential commit before it reaches a shared branch, which is far cheaper than a post-hoc rotation.

Source reports

A sample of the disclosed HackerOne reports this playbook was synthesized from.

Frequently Asked Questions

What is Insufficiently Protected Credentials?
Reports cluster around: (1) curl/libcurl bugs that leak Authorization / Cookie / Proxy-Authorization / FTP-USER credentials when following redirects across hosts/protocols (CVE-2018-1000007, CVE-2021-22923, CVE-2022-27774, CVE-2022-27776); (2) staging/test app accepting default credentials; (3) IDOR or low-permission endpoint leaking enough info (username) to feed brute force; (4) library-shipped vulnerable dep (moment-timezone) exposing data; (5) HSTS bypass via IDN or trailing-dot enabling downgrade attacks.
How common is Insufficiently Protected Credentials in bug bounty reports?
Scanrub's research corpus for this playbook is built from 30 disclosed HackerOne reports in this category, synthesized for detection and prevention guidance rather than reproduced verbatim.
How do I test for Insufficiently Protected Credentials?
Map every input vector, record a baseline response, then inject targeted test payloads one field at a time and compare the response for timing, length, error, or reflection differences from that baseline. The "How to Test" section above walks through the full methodology for this specific vulnerability class.
What is the single most effective fix for Insufficiently Protected Credentials?
Store every credential and key in a dedicated secrets manager injected at runtime, never in source control or a shipped default — and rotate anything that was ever committed.
Weekly security research

New vulnerability playbooks, tool updates, and bug bounty insights - delivered to your inbox. No spam.

Unsubscribe anytime. We respect your inbox.
Press ⌘K to search×