<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>A (Minor) Twitter Privacy Bug? &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/2011/05/a-minor-twitter-privacy-bug/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Sat, 09 May 2026 07:14:19 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>A (Minor) Twitter Privacy Bug? &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[A (Minor) Twitter Privacy Bug?]]></title>
		<link>https://shkspr.mobi/blog/2011/05/a-minor-twitter-privacy-bug/</link>
					<comments>https://shkspr.mobi/blog/2011/05/a-minor-twitter-privacy-bug/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Mon, 09 May 2011 12:00:03 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[twitter]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=4045</guid>

					<description><![CDATA[Quick Summary  Twitter&#039;s secure API hides the contents of the tweets you are reading. But it doesn&#039;t hide the images of those you converse with.  Raised as Issue 2175.  A Bit More Detail  Twitter has a secure (HTTPS) and insecure (HTTP) API.  When calling the secure API, all the content of the returned message (tweets) are encrypted.  Eavesdroppers only see the cipher-text - essentially garbage.  …]]></description>
										<content:encoded><![CDATA[<h2 id="quick-summary"><a href="https://shkspr.mobi/blog/2011/05/a-minor-twitter-privacy-bug/#quick-summary">Quick Summary</a></h2>

<p>Twitter's secure API hides the contents of the tweets you are reading. But it doesn't hide the images of those you converse with.</p>

<p><a href="https://web.archive.org/web/20160515080123/https://code.google.com/p/twitter-api/issues/detail?id=2175">Raised as Issue 2175</a>.</p>

<h2 id="a-bit-more-detail"><a href="https://shkspr.mobi/blog/2011/05/a-minor-twitter-privacy-bug/#a-bit-more-detail">A Bit More Detail</a></h2>

<p>Twitter has a secure (HTTPS) and insecure (HTTP) API.</p>

<p>When calling the secure API, all the content of the returned message (tweets) are encrypted.  Eavesdroppers only see the cipher-text - essentially garbage.</p>

<p>However, within that cipher-text are links to <em>insecure</em> resources.</p>

<p>For example, a user requesting my tweets will get an object which contains a link to my avatar image.</p>

<p>Twitter is currently returning the <em>insecure</em> link:</p>

<pre>"profile_image_url" :
    "http://a2.twimg.com/profile_images/1283757621/Sketch_Avatar.jpg"</pre>

<p>Twitter should be returning the <em>secure</em> link:</p>

<pre>"profile_image_url" :
    "https://si0.twimg.com/profile_images/1283757621/Sketch_Avatar.jpg"</pre>

<h2 id="exploiting-this-weakness"><a href="https://shkspr.mobi/blog/2011/05/a-minor-twitter-privacy-bug/#exploiting-this-weakness">Exploiting This Weakness</a></h2>

<p>A user (Anna) will request the <em>encrypted</em> text of my tweets
She then requests the <em>unencrypted</em> image.
An eavesdropper (Eve) is listening in on the connection between Anna and Twitter.</p>

<pre>Anna ----&gt;Eve----&gt;Twitter  (Secure request)
Anna &lt;----Eve&lt;----Twitter  (Secure response)</pre>

<p>When Anna makes the initial request to Twitter, the malicious Eve can't see what they're talking about.</p>

<ul>
    <li>The request "http<strong>s</strong>://example.com/twitter/edent" is itself encrypted.  Eve only sees an encrypted request to example.com - not "twitter/edent</li>
    <li>The response containing all the tweets is also encrypted</li>
</ul>

<pre>Anna ----&gt;Eve----&gt;Images  (insecure request)
Anna &lt;----Eve&lt;----Twitter  (insecure response)
</pre>

<p>Anna then makes the subsequent request for the twitter user's image, a malicious user can see</p>

<ul>
    <li>The URI of the request.</li>
    <li>The content of the image.</li>
</ul>

<h2 id="impact"><a href="https://shkspr.mobi/blog/2011/05/a-minor-twitter-privacy-bug/#impact">Impact</a></h2>

<p>Truth is, this has a pretty low security impact.</p>

<ul>
    <li>There is no way to determine a user's name based on the URI for their image. (Unless you already have both).</li>
    <li>An eavesdropper has no way of knowing if the image is from the timeline, a reply, a DM, a search, a retweet, or the public timeline.</li>
    <li>Images may be locally cached by the user's browser - so frequency analysis isn't reliable.</li>
    <li>A malicious user <em>could</em> alter the image in transit.</li>
</ul>

<p>Worst case scenario is that if a malicious man-in-the-middle knows which images relate to which Twitter users, they know the intercepted user has seen at least one tweet from that user.</p>

<p>Let's say Anna is communicating with Bob.  Eve is trying to eavesdrop.
If Bob has never tweeted, and Eve sees repeated requests from Anna for Bob's avatar, she may reasonably surmise that they are exchanging DMs.</p>

<h2 id="overall"><a href="https://shkspr.mobi/blog/2011/05/a-minor-twitter-privacy-bug/#overall">Overall</a></h2>

<p>This is a pretty low-impact privacy risk.
It can be fixed by Twitter's API returning HTTPS URIs where possible.
In the meantime, developers can replace "http://a2.twimg.com/" with "https://si0.twimg.com".</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=4045&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2011/05/a-minor-twitter-privacy-bug/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
