Description
The product displays information or identifiers to a user, but the display mechanism does not make it easy for the user to distinguish between visually similar or identical glyphs (homoglyphs), which may cause the user to misinterpret a glyph and perform an unintended, insecure action.
Some glyphs, pictures, or icons can be semantically distinct to a program, while appearing very similar or identical to a human user. These are referred to as homoglyphs. For example, the lowercase "l" (ell) and uppercase "I" (eye) have different character codes, but these characters can be displayed in exactly the same way to a user, depending on the font. This can also occur between different character sets. For example, the Latin capital letter "A" and the Greek capital letter "Α" (Alpha) are treated as distinct by programs, but may be displayed in exactly the same way to a user. Accent marks may also cause letters to appear very similar, such as the Latin capital letter grave mark "À" and its equivalent "Á" with the acute accent. Adversaries can exploit this visual similarity for attacks such as phishing, e.g. by providing a link to an attacker-controlled hostname that looks like a hostname that the victim trusts. In a different use of homoglyphs, an adversary may create a back door username that is visually similar to the username of a regular user, which then makes it more difficult for a system administrator to detect the malicious username while reviewing logs.
Potential Impact
Integrity, Confidentiality
Other
Demonstrative Examples
http://www.еxаmрlе.соm123.123.123.123 аdmіn [17/Jul/2017:09:05:49 -0400] "GET /example/users/userlist HTTP/1.1" 401 12846
123.123.123.123 аdmіn [17/Jul/2017:09:06:51 -0400] "GET /example/users/userlist HTTP/1.1" 200 4523
123.123.123.123 admin [17/Jul/2017:09:10:02 -0400] "GET /example/users/editusers HTTP/1.1" 200 6291
123.123.123.123 аdmіn [17/Jul/2017:09:10:02 -0400] "GET /example/users/editusers HTTP/1.1" 200 6291Mitigations & Prevention
Use a browser that displays Punycode for IDNs in the URL and status bars, or which color code various scripts in URLs. Due to the prominence of homoglyph attacks, several browsers now help safeguard against this attack via the use of Punycode. For example, Mozilla Firefox and Google Chrome will display IDNs as Punycode if top-level domains do not restrict which characters can be used in domain names or if labels mix scripts for different languages.
Use an email client that has strict filters and prevents messages that mix character sets to end up in a user's inbox. Certain email clients such as Google's GMail prevent the use of non-Latin characters in email addresses or in links contained within emails. This helps prevent homoglyph attacks by flagging these emails and redirecting them to a user's spam folder.
Detection Methods
- Manual Dynamic Analysis Moderate — If utilizing user accounts, attempt to submit a username that contains homoglyphs. Similarly, check to see if links containing homoglyphs can be sent via email, web browsers, or other mechanisms.
Real-World CVE Examples
| CVE ID | Description |
|---|---|
| CVE-2013-7236 | web forum allows impersonation of users with homoglyphs in account names |
| CVE-2012-0584 | Improper character restriction in URLs in web browser |
| CVE-2009-0652 | Incomplete denylist does not include homoglyphs of "/" and "?" characters in URLs |
| CVE-2017-5015 | web browser does not convert hyphens to punycode, allowing IDN spoofing in URLs |
| CVE-2005-0233 | homoglyph spoofing using punycode in URLs and certificates |
| CVE-2005-0234 | homoglyph spoofing using punycode in URLs and certificates |
| CVE-2005-0235 | homoglyph spoofing using punycode in URLs and certificates |
Related Weaknesses
Frequently Asked Questions
What is CWE-1007?
CWE-1007 (Insufficient Visual Distinction of Homoglyphs Presented to User) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Base-level weakness. The product displays information or identifiers to a user, but the display mechanism does not make it easy for the user to distinguish between visually similar or identical glyphs (homoglyphs), which...
How can CWE-1007 be exploited?
Attackers can exploit CWE-1007 (Insufficient Visual Distinction of Homoglyphs Presented to User) to other. This weakness is typically introduced during the Architecture and Design, Implementation phase of software development.
How do I prevent CWE-1007?
Key mitigations include: Use a browser that displays Punycode for IDNs in the URL and status bars, or which color code various scripts in URLs. Due to the prominence of homoglyph attacks, several browsers
What is the severity of CWE-1007?
CWE-1007 is classified as a Base-level weakness (Medium abstraction). It has been observed in 7 real-world CVEs.