A programming bug on Facebook’s website may have accidentally given advertisers and others access to Facebook users’ accounts including profiles, photographs, chat, and also had the ability to post messages and mine personal information, according to security researchers at Symantec.

According to Symantec, certain Facebook applications have been inadvertently handing advertisers access tokens — strings of numbers and letters that can be used by a browser to access Facebook accounts over the Web. “Access tokens are like the ‘spare keys’ granted by you to the Facebook applications,” Symantec said in a blog post. “Each token or ‘spare key’ is associated with a select set of permissions, like reading your wall, accessing your friend’s profile, posting to your wall, etc.”

Users habitually grant this type of access to Facebook applications so they can do things such as write on profile walls, but by handing over these tokens to others, application developers were accidentally giving advertisers or online analytics companies a way to get at this information too.

There is no good way to estimate how many access tokens have already been leaked since the release Facebook applications back in 2007. We fear a lot of these tokens might still be available in log files of third-party servers or still being actively used by advertisers. Concerned Facebook users can change their Facebook passwords to invalidate leaked access tokens. Changing the password invalidates these tokens and is equivalent to “changing the lock” on your Facebook profile.

The issue doesn’t affect Facebook applications that use the newer OAUTH2.0 authentication system, Symantec said.

Fortunately, the third-parties may not have realized their ability to access this information. Symantec have already reported this issue to Facebook, who has taken corrective action to help eliminate this issue.

You're currently offline