Rafay Baloch

Founder & CEO, RedSecLabs. Security researcher, author of two books on offensive security, and speaker at Black Hat Asia, Hack In Paris and CSAW. Best known for the Android Browser same-origin policy bypass (CVE-2014-6041), research that prompted Google to re-architect WebView as a separately updatable component.

His research has centred on one question for over a decade: when a browser tells a user where content came from, can that be trusted? That work produced same-origin policy bypasses, address bar spoofing vulnerabilities in Safari, Microsoft Edge and most major mobile browsers, and contributions that reached the Metasploit Framework.

He has been recognised with the Pride of Pakistan award, named among Checkmarx’s Top 5 Ethical Hackers and SC Media’s Threat Seekers, co-authored Pakistan’s national Cyber Security Strategy for the Telecom Sector as Senior Consultant at the national telecom regulator, and was appointed amicus curiae by the Islamabad High Court. Today he leads RedSecLabs from London and still works technically alongside the consulting team.

2
Books published by Taylor & Francis
National
Telecom cyber security strategy co-authored
Black Hat
Asia, plus Hack In Paris, CSAW, HEXCON
Pride of Pakistan
National award, ISPR 2022

A decade of browser trust-boundary research

The same-origin policy is the boundary that makes the web safe to use: content loaded from one origin must not be able to read the properties of another. Rafay’s research repeatedly demonstrated where that boundary broke down in practice, most notably in CVE-2014-6041, a same-origin policy bypass in the Android Open Source Project browser. Google initially rejected the report; it was accepted after researchers at Rapid7 independently verified it, and Trend Micro later found the issue to be more widespread than first understood. The episode contributed to Google re-architecting WebView as a component updatable independently of the Android version.

A parallel line of work covered address bar spoofing: making a browser display one origin while serving content from another. In 2018 he disclosed spoofing vulnerabilities in both Apple Safari and Microsoft Edge; Microsoft shipped a fix within two months, and after Apple did not respond within the 90-day window, the research was published. In October 2020, in a disclosure coordinated by Rapid7, he unveiled address bar spoofing vulnerabilities affecting Safari, Yandex, Opera Mini, Opera Touch, UC Browser, Bolt and RITS — covered by TechCrunch, The Register, BBC, Forbes and The Daily Swig.

The methodology behind this work was presented at Black Hat Asia in Bypassing Browser Security Policies For Fun And Profit. The through-line is consistent: as memory corruption became harder to exploit, vulnerability classes that attack trust and identity — same-origin policy bypass, universal XSS, spoofing and cross-file attacks — became the more practical route to compromise.

Selected disclosure record

A selection of publicly documented vulnerability disclosures, each independently reported in mainstream and industry press.

YearTargetClassOutcome
2014Android Browser (AOSP) < 4.4Same-origin policy bypass (CVE-2014-6041)Verified via Rapid7; contributed to Google re-architecting WebView
2014–15Android WebViewLocal file read, cookie theftContributions reached the Metasploit Framework with Joe Vennix
2015Android stock browserAddress bar spoofing (CVE-2015-3830)Proof of concept developed with Rapid7; reported via CERT/CC
2016Chrome and Firefox for AndroidAddress bar spoofing (CVE-2016-5267)Right-to-left Unicode URL flip; $5,000 in combined vendor rewards
2018Apple Safari, Microsoft EdgeAddress bar spoofingMicrosoft patched in two months; published after Apple missed the 90-day window
2020Safari, Yandex, Opera Mini, UC, Bolt, RITSAddress bar spoofingCoordinated by Rapid7 on a 60-day timeline; PoCs released after expiry
2024PureVPN Linux clientMultiple vulnerabilitiesJoint research; covered by The Independent

Compiled from public disclosures and press coverage. See the advisories index for the current record.

Books and published work

Two practitioner texts published by Taylor & Francis, used in university courses and professional training worldwide.

TitlePublisherYearISBN
Ethical Hacking and Penetration Testing GuideAuerbach Publications / Taylor & Francis2014978-1-4822-3161-8
Web Hacking Arsenal: A Practical Guide to Modern Web PentestingCRC Press / Taylor & Francis2024978-1-032-44719-3

Full publication list, including research papers, is on our publications page.

National policy and standards work

Alongside vulnerability research, Rafay has contributed to national-level cyber security policy as Senior Consultant for Cyber Security at the Pakistan Telecommunication Authority, the country’s national telecom regulator.

WorkBodyRole
Cyber Security Strategy for Telecom Sector 2023–2028Pakistan Telecommunication AuthorityNamed contributor on the authoring team, credited as Senior Consultant Cybersecurity
National Cyber Security Framework for Telecom SectorPakistan Telecommunication AuthorityContributor to the formulation of the framework
Cyber security regulationsPakistan Telecommunication AuthorityEnhancement of sector cyber security regulations
Telecom sector audit criteriaPakistan Telecommunication AuthorityFormulation of audit criteria for the sector
Social media regulation case (2021)Islamabad High CourtAppointed amicus curiae to advise the court

The telecom strategy is published by the PTA and names the authoring team.

Recognition and appointments

Awards, listings and public appointments, each independently documented.

Pride of Pakistan award for contribution to cyber security, ISPR, March 2022
Chevening Scholar, the UK government’s international scholarship programme
Top 5 Ethical Hackers of 2014, named by Checkmarx
The 15 Most Successful Ethical Hackers Worldwide
Reboot 25: Threat Seekers, SC Media
TechJuice 25 under 25 (2016), ranked 13th among high achievers
Top 21 Cybersecurity Experts to Follow, Reflectiz (2021)
Amicus curiae to the Islamabad High Court (2021) on social media regulation

Conference speaking

Selected international conferences where this research has been presented.

Black Hat Asia — Bypassing Browser Security Policies For Fun And Profit
TyphoonCon — Browser Security Showdown: Uncovering Security Vulnerabilities in Modern Browsers
Hack In Paris 2023 — uncovering security bugs in mobile browsers
CSAW Conference
HEXCON
10th Information Security Conference, Greece

Selected media coverage

Research by Rafay and his collaborators has been reported by BBC News, Forbes, TechCrunch, The Register, Engadget, Threatpost, SC Media, The Daily Swig, AppleInsider, IT Pro, South China Morning Post and Hindustan Times, among others.

He is regularly approached for comment and analysis on browser security, mobile privacy, deepfakes and disclosure policy by national and international outlets including the Wall Street Journal, The Independent, Dawn and The Express Tribune.

He has written on security at rafaybaloch.com since 2011, where much of the browser research above was first published alongside full disclosure timelines.

Current research: trust boundaries in AI agents

The browser spent twenty-five years building the same-origin policy because separating origins is what makes it safe to render untrusted content. AI browsing agents largely dissolve that separation: content retrieved from a web page, a document, an email and a search result is flattened into a single context window, and the model has no reliable notion of which origin any instruction came from.

That makes indirect prompt injection a direct descendant of the vulnerability classes above. Where a same-origin policy bypass let content from one origin read another’s data, an injected instruction can now cause an agent, already authenticated as the user, to act against a second origin on an attacker’s behalf. Where address bar spoofing misled a user about an origin, agent interfaces frequently present no origin information at all.

This is the focus of current research at RedSecLabs, and it underpins our AI and LLM penetration testing methodology. Findings are handled under coordinated disclosure with the relevant vendors before publication.

Areas of expertise

Where Rafay works directly with clients and leads methodology development at RedSecLabs.

Browser security: same-origin policy, content security policy, universal XSS and spoofing classes
AI and LLM application security, including prompt injection and agent trust boundaries
Web application and API penetration testing methodology
Mobile application, WebView and mobile browser security
WAF bypass research and detection evasion
Coordinated vulnerability disclosure and advisory programmes

Work With Our Research Team

The methodology behind our published research is the same methodology we bring to client engagements.

Frequently Asked Questions

Browser security research, most notably CVE-2014-6041, a same-origin policy bypass in the Android Open Source Project browser. He has disclosed address bar spoofing vulnerabilities in Apple Safari, Microsoft Edge and most major mobile browsers, authored two books on offensive security published by Taylor & Francis, and presented at Black Hat Asia, Hack In Paris and CSAW.

Two: Ethical Hacking and Penetration Testing Guide (Auerbach Publications / Taylor & Francis, 2014), a 531-page practitioner introduction to penetration testing methodology, and Web Hacking Arsenal: A Practical Guide to Modern Web Pentesting (CRC Press, 2024), which covers modern web application attack techniques.

The same-origin policy is the browser rule that content from one origin (scheme, domain and port) must not read the properties of another, cookies, page content, responses. A bypass breaks that separation, letting a malicious site read data from sites the user is logged into. It is one of the most impactful classes of browser vulnerability because it defeats the boundary the whole web security model rests on.

Because the underlying problem is the same. AI browsing agents merge content from many origins into one context window with no origin separation, so injected instructions in retrieved content can direct an agent that is already authenticated as the user. It is the same trust-boundary failure the same-origin policy was designed to prevent, moved into a new layer. That connection informs our AI and LLM penetration testing methodology.

Yes. He received the Pride of Pakistan award from ISPR in 2022, was named among Checkmarx’s Top 5 Ethical Hackers of 2014 and SC Media’s Reboot 25 Threat Seekers, is a Chevening Scholar, and was appointed amicus curiae by the Islamabad High Court in 2021 on social media regulation. His disclosures have been reported by BBC News, Forbes, TechCrunch and The Register.

As Senior Consultant for Cyber Security at the Pakistan Telecommunication Authority, he is a named contributor to the Cyber Security Strategy for Telecom Sector 2023–2028, a published national strategy document, and contributed to the National Cyber Security Framework for the Telecom Sector, sector cyber security regulations and audit criteria. In 2021 the Islamabad High Court appointed him amicus curiae in a case on social media regulation.

Yes. Alongside leading the firm from London, he works technically with the consulting team, leads methodology development, and continues to publish research. Client engagements are delivered by the wider CREST-accredited team rather than by any individual.

Through our advisories and disclosure page, which sets out our coordinated disclosure policy, contact details and expected timelines. We handle reports about our own systems and coordinate disclosure for vulnerabilities our researchers find in third-party products.

For conference invitations, press comment or research collaboration, contact us through the main contact form and mark it for the research team.
📞 Call us Book a call