“The $10,800 Typo: How a Single Dot Broke Twitter’s Authentication”
嗯,用户让我帮忙总结一篇文章的内容,控制在一百个字以内,而且不需要用“文章内容总结”之类的开头。首先,我得仔细阅读文章,理解它的主要观点。 文章讲的是Twitter的“Sign in with Digits”功能中的一个安全漏洞。这个漏洞是因为正则表达式的一个小错误导致的。具体来说,代码中使用了search()函数,而这个函数会把参数转成正则表达式。结果,原本应该匹配特定域名的检查被绕过了,攻击者可以利用这一点接管账户。 我需要把重点放在漏洞的原因和影响上。原因是一个正则表达式的错误,影响是导致账户被接管。所以总结的时候要提到Twitter的功能、正则表达式错误、以及账户接管的结果。 接下来,我要控制在100字以内,确保语言简洁明了。可能的结构是:Twitter的功能名称、问题所在(正则表达式错误)、以及结果(账户接管)。 最后检查一下有没有超过字数限制,并且确保没有使用任何开头的固定句式。 </think> Twitter“Sign in with Digits”功能因正则表达式错误导致账户接管漏洞。 2025-10-16 05:43:6 Author: infosecwriteups.com(查看原文) 阅读量:41 收藏

Aman Sharma

While researching web authentication vulnerabilities, I came across a fascinating case study that demonstrates how a tiny implementation flaw can compromise an entire authentication system. This wasn’t a complex cryptographic break — it was a simple regex mistake in Twitter’s “Sign in with Digits” feature that allowed complete account takeover.

free link

Press enter or click to view image in full size

The Vulnerability: When a Dot Becomes a Wildcard

The issue was in Twitter’s Digits SDK, specifically in how it validated message origins between the authentication service and client websites. The vulnerable code looked like this:

onReceiveMessage: function(t) {
this.config && -1 !== this.config.get("sdk_host").search(t.origin) && this.resolve(t.data)
}

At first glance, it seems like it’s checking if the message origin matches https://www.digits.com. But there's a critical flaw in how JavaScript's String.prototype.search() works.

The Devil in the Details:

  • search() converts its parameter to a regular expression
  • In regex, dots (.) match any single character
  • So "https://www.digits.com".search("www.d.gits.co") actually returns a match position…

文章来源: https://infosecwriteups.com/the-10-800-typo-how-a-single-dot-broke-twitters-authentication-f485e6dc0f04?source=rss----7b722bfd1b8d--bug_bounty
如有侵权请联系:admin#unsafe.sh