SecurityContext

CVE-2021-21814: HandleFileArg - Buffer Overflow

  • Cve: CVE-2021-21814
  • Name: HandleFileArg - Buffer Overflow
  • Description: Within the function HandleFileArg the argument filepattern is under control of the user who passes it in from the command line. filepattern is passed directly to strlen to determine the ending location of the char* passed in by the user, no checks are done to see if the passed in char* is longer than the staticly sized buffer data is memcpy‘d into, but after the memcpy a null byte is written to what is assumed to be the end of the buffer to terminate the char*, but without length checks, this null write occurs at an arbitrary offset from the buffer. An attacker can provide malicious input to trigger this vulnerability.
  • Impact: Attackers can cause memory corruption, potentially leading to application crashes or arbitrary code execution.
  • Remediation: Implement length checks before memcpy and ensure null termination within buffer bounds.
  • Vulnerability type: buffer_overflow
  • Vulnerability impact: remote_code_execution, denial_of_service
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 7.8
  • Cvss vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.00344
  • Epss percentile: 0.28279
  • Assignee: [email protected]
  • Published at: 2021-08-13T23:15:07Z
  • Age in days: 1929
  • Modified at: 2026-06-17T03:36:10Z
  • Public exploits total: 1
  • References total: 1
  • Products total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-21814
  • Nvd status: modified
  • Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits capped, oss, projects total, projects, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-88Improper Neutralization of Argument Delimiters in a Command

Public exploits

UrlSourceAdded date
https://talosintelligence.com/vulnerability_reports/TALOS-2021-1280nvd2021-08-13

References

UrlSourceTags
https://talosintelligence.com/vulnerability_reports/TALOS-2021-1280nvdExploit, Third Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
att:xmill= 0.7nonvd/v1/products/att/xmill

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Public exploit: yes
  • Public exploit count: 1
  • Public exploit first date: 2021-08-13
  • Authentication required: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, remote
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts