Connect with us
X
Categories:

Technology

XSS in Gmail’s AMP For Email earns researcher $5,000

Published

on

XSS in Gmail’s AMP For Email earns researcher $5,000
Share this post:

Researcher bypasses email filter with inspired style tag trickery.

A cross-site scripting (XSS) vulnerability in AMP for Email, Gmail’s dynamic email feature, has netted a security researcher a $5,000 bug bounty payout.

AMP for Email brings AMP functionality to rich, interactive emails. AMP itself is an open source HTML framework used to optimize websites for web browsing on mobile.

Adi Cohen, who unearthed the security flaw, said he had no problem finding a vector that triggered an XSS within the AMP playground, but found bypassing Gmail’s XSS filter a much tougher assignment.

Rendering contexts

The “easiest way to circumvent an XSS filter is by tricking it into a different rendering context than what the browser will actually use to render a given piece of code”, observed Cohen in a blog post.

Since AMP for Email forbids the likes of templates, SVG, math, and CSS, he instead targeted stylesheets as a potential path to an XSS payload with multiple rendering contexts.

This required a discrepancy between how the stylesheet is rendered by the filter and browser, either by “tricking the filter into believing a fake style tag is real”, or “the exact opposite”.

Cohen’s initial vector worked in the sandbox because AMP “leaves the CSS context as soon as it encounters the string ‘</style’ even if it doesn’t have a closing bracket (>) or at least a whitespace after it”.

He was then able to “trick the filter into believing we’re back in HTML context, while the browser obviously ignores </styleX> entirely and stays well within the realm of CSS”.

</styl> over substance

But “what looked like a promising vector in AMP, seemed way less interesting after Gmail ran its magic on it,” said Cohen.

RECOMMENDED  A trio of XSS flaws in open source web applications might jeopardize the entire system

A breakthrough came when he harnessed a CSS selector, which ensured the payload was returned unchanged by Gmail – “no escaping or other mutations”.

However, the malicious payload prompted an error after the AMP sandbox encountered ‘</style’, so Cohen tried </styl>, but Gmail’s filter was wise to its resemblance to </style>.

What worked instead was testing a benign payload with an encoded selector – because Gmail decoded it, he could use the selector to inject a closing style tag.

Cohen reported the issue to Google on March 27, 2021, and noticed on July 7 that it had been fixed.

Google addressed an unrelated, notable XSS in AMP For Email back in 2019, after security researcher Michał Bentkowski leveraged id attributes in tags to enable ‘DOM clobbering’ attacks.


Get More Stories Like This On: Facebook: @AllNaijaEntertainment, Twitter: @AllNaijaEntertainment
General2 hours ago

Skylar Grey – Everything I Need [LYRICS]

General2 hours ago

[Music] Diddy – Dirty Money – “Coming Home” Feat. Skylar Grey

General2 hours ago

Diddy – Dirty Money – “Coming Home” Feat. Skylar Grey [LYRICS]

General2 hours ago

[Music] African China – Amen

General2 hours ago

[Music] African China – Baba God

General2 hours ago

African China – Baba God [LYRICS]

General2 hours ago

Machine Gun Kelly (MGK) “Home” Feat X Ambassadors & Bebe Rexha [LYRICS]

General3 hours ago

Passenger – Let Her Go [LYRICS]

General3 hours ago

[Music] Eminem – “No Love” Feat. Lil Wayne

General3 hours ago

Eminem – “No Love” Feat. Lil Wayne [LYRICS]

Music3 hours ago

[Music] Tatiana Manaois – Buzz Kill

General3 hours ago

Tatiana Manaois – Buzz Kill [LYRICS]

General3 hours ago

James Blunt – Goodbye My Lover [LYRICS]

General3 hours ago

Major Lazer – “Particula” Feat. Nasty C , Ice Prince, Patoranking & Jidenna [LYRICS]

General3 hours ago

James Blunt – You’re Beautiful [LYRICS]

General3 hours ago

Justin Timberlake – Mirrors [LYRICS]

General3 hours ago

[Music] Darey – “Pray For Me” feat. Soweto Gospel Choir

General3 hours ago

Eminem – “Love The Way You Lie” Feat. Rihanna [LYRICS]

General3 hours ago

Goldlink ft. Miguel – Got Friends [LYRICS]

General3 hours ago

Sia – I’m Still Here [LYRICS]

General3 hours ago

Yo Gotti ft. Nicki Minaj – Rake It Up [LYRICS]

General4 hours ago

Shane McMahon – Here Comes The Money [LYRICS]

General4 hours ago

Journey – Faithfully [LYRICS]

General4 hours ago

[Music] Journey – Faithfully

General4 hours ago

Eminem – Not Afraid [LYRICS]

General4 hours ago

[Music] Journey – Don’t Stop Believin’

General4 hours ago

Journey – Don’t Stop Believin’ [LYRICS]

General4 hours ago

21 Savage – Bank Account [LYRICS]

General4 hours ago

Demi Lovato – Sober [LYRICS]

General5 hours ago

Beyonce ft. Jay-Z – Apeshit [LYRICS]

General5 hours ago

Nasty C ft. ASAP Ferg – King [LYRICS]

General5 hours ago

Lil Wayne – Uproar [LYRICS]

Ed Sheeran
Lyrics5 hours ago

Ed Sheeran – Perfect [LYRICS]

General5 hours ago

[Music] Mo’Hits All Star – Close To You

General5 hours ago

Lil Dicky ft. Chris Brown – Freaky Friday [LYRICS]

Michael Jackson
Lyrics5 hours ago

Michael Jackson – Stranger In Moscow [LYRICS]

General5 hours ago

[Music] Celine Dion – I Drove All Night

General5 hours ago

Celine Dion – I Drove All Night [LYRICS]

General5 hours ago

Tatiana Manaois – Hey Little Lady [LYRICS]

Music5 hours ago

[Music] Tatiana Manaois – Live Better

Gnash (singer)
Music4 days ago

[Music] Gnash Ft Olivia O’Brien – I Hate you, I Love you

John Legend
Music1 day ago

[INSTRUMENTAL] John Legend – All Of Me

Alan Walker
Music5 days ago

Alan Walker – Faded [INSTRUMENTAL]

21 Savage
Music2 days ago

[Video] 21 Savage ft. Offset & Metro Boomin – Rap Saved Me

Wiz Khalifa
Music3 days ago

[Instrumental] Wiz Khalifa – See You Again ft. Charlie Puth

General6 days ago

[Music] Sapientdream – Pastlives

Salvation Ministry Choir Amen
Lyrics2 days ago

Salvation Ministry Choir – Amen [LYRICS]

General7 days ago

[Music] Don Omar – Danza Kuduro (feat. Lucenzo)

General5 days ago

[Music] The Chainsmokers – ‘Don’t Let Me Down’ Feat. Daya

General7 days ago

Ladé – Adulthood Anthem (Adulthood Na Scam) [Lyrics]

General7 days ago

[Music] Timbaland – Apologize ft. OneRepublic

Powfu (singer)
Music4 days ago

[Music] Powfu – Death Bed (Coffee for Your Head) Feat. Beabadoobee

General4 days ago

[Music] Wyclef Jean – “Sweetest Girl (Dollar Bill)” Feat. Akon, Lil Wayne, Niia

General3 days ago

[Music] Zayn Malik – Entertainer

Wiz Khalifa - See You Again ft. Charlie Puth
Music4 days ago

[Music] Wiz Khalifa – See You Again ft. Charlie Puth

Music3 days ago

[Music] Exalted Tribe (HICC) – We Dey Halla

Anna Kendrick
Music4 days ago

[Music] Anna Kendrick – Cups (Pitch Perfect’s “When I’m Gone”)

General2 hours ago

[Music] Diddy – Dirty Money – “Coming Home” Feat. Skylar Grey

General1 day ago

[Music] John Legend – Love Me Now

Right Said Fred
Music4 days ago

[Music] Right Said Fred – Stand Up (For the Champions)

Salvation Ministries Mass Choir
Music1 day ago

[Music] Salvation Ministries Choir – Chioma Me Eh(Good God)

General7 hours ago

[Music] Celine Dion – If That’s What It Takes

Salvation Ministries Mass Choir
Lyrics1 day ago

Salvation Ministries Choir – Chioma Me Eh(Good God) [LYRICS]

General8 hours ago

[Music] P!nk – Try

General6 days ago

[Music] Shaggy – Strength Of A Woman

General1 day ago

[Music] Jaden Smith – Goku

Music3 days ago

[Music] Wiz Khalifa – See You Again (Remix) Feat Charlie Puth, Eminem, Tyga, & Chris Brown

R. Kelly
Music4 days ago

[Music] R. Kelly – World’s Greatest

General1 day ago

Magic! — Rude [LYRICS]

General4 hours ago

[Music] Journey – Don’t Stop Believin’

General6 days ago

[Music] Justin Bieber – Love Me

General2 days ago

[Music] Cardi B – Bartier Cardi ft. 21 Savage

General7 days ago

[Music] Lionel Richie – Angel

General3 days ago

[Music] Tyga ft. Offset – Taste

General8 hours ago

[Music] P!nk – “Just Give Me A Reason” Feat. Nate Ruess

General6 days ago

[Music] BIG SHAQ – Man’s Not Hot

General2 days ago

[Music] 21 Savage ft. Offset & Metro Boomin – Rap Saved Me

General7 days ago

[Music] Shayne Ward – Breathless

General6 days ago

[Music] Post Malone – Candy Paint

General5 days ago

[Music] R Kelly – When A Woman Loves

ANE Billboard Hots



Join "ANE sabi" clique

Don't miss a thing, get ogbonge ANE latest updates to fuel your conversation daily.