Twitter has taken legal action to remove what it said was a portion of its source code that was posted online.
The code was posted on Microsoft-owned code-sharing site GitHub, according to Twitter, in a repository that has now been taken down.
The incident is the latest challenge for Twitter under Elon Musk’s ownership, which has seen mass layoffs, the flight of major advertisers and an increased frequency of technical outages.
Twitter notified GitHub of the code leak late on Friday in a Digital Millenium Copyright Act (DMCA) takedown notice, and the code was removed the same day.
GitHub said it does not comment on decisions to remove content, but makes all DMCA takedown requests public in the interests of transparency.
The code appeared to have been public for several months.
The user account that posted it, FreeSpeechEnthusiast, shows a single contribution to the site in early January.
Twitter executives said they had only recently been made aware of the leak, according to unnamed sources cited by The New York Times.
The people also speculated that the code might have been stolen by a person who left Twitter last year.
Since Musk bought Twitter last October for $44 billion (£36bn) more than 75 percent of Twitter’s previous 7,500 staff have been laid off or resigned.
Twitter has started an investigation into the matter, and also asked the US District Court for the Northern District of California to order GitHub to identify the person who uploaded the code and any individuals who downloaded it, according to a legal filing.
Access to source code can help potential attackers to identify security vulnerabilities, although in many cases developers make the code freely available so that third-party developers can help locate bugs.
Musk himself said earlier this month he plans to make public the code used to recommend tweets at the end of March.
Separately, Musk told employees in an email on Friday he estimated Twitter is now worth about $20bn, or less than half what he paid for it last year.
The estimate was made in the context of Musk’s offer of stock grants to staff, according to multiple reports.
Musk also reportedly told staff in the email, “I see a clear, but difficult, path to a >$250B valuation,” suggesting a tenfold increase in the firm’s valuation.
Targetting AWS, Microsoft? British competition regulator soon to announce “behavioural” remedies for cloud sector
Move to Elon Musk rival. Former senior executive at X joins Sam Altman's venture formerly…
Bitcoin price rises towards $100,000, amid investor optimism of friendlier US regulatory landscape under Donald…
Judge Kaplan praises former FTX CTO Gary Wang for his co-operation against Sam Bankman-Fried during…
Explore the future of work with the Silicon In Focus Podcast. Discover how AI is…
Executive hits out at the DoJ's “staggering proposal” to force Google to sell off its…