Connect with us
X
Categories:

Technology

Csurf NPM package has a CSRF issue that was created to guard against similar flaws

Published

on

Csurf NPM package has a CSRF issue that was created to guard against similar flaws
Share this post:

Pen testers hunting for low-severity bugs found a far more severe cross-site request forgery (CSRF) flaw in the open source csurf software.

Researchers from UK-based cybersecurity firm Fortbridge were called in when a customer asked them to review a penetration testing report. An issue flagged was a CSRF cookie missing a secure flag.

Curious about the finding, the team began digging. According to an August 28 blog post put together by Fortbridge cloud application security consultant Adrian Tiron, the issue was ultimately traced back to a node.js application relying on csurf.

Csurf is a project designed to allow developers to create middleware for CSRF token creation and validation via sessions or cookies. The NPM package is still downloaded approximately 400,000 times per week even though its last formal update was three years ago.

Tiron writes that while the popular package was intended to defend against CSRF, a CSRF bug has lain dormant within the code since the last version release, impacting any application using the open source package.

After exploring the csurf code, the pen testers found several problems. These included secrets stored in clear text within _csrf cookies; the use of the broken SHA-1 cryptographic algorithm; a lack of signature checks for cookies by default, and the validation of header tokens against the secret or GET/POST parameters with different names.

Furthermore, Tiron explained that there was some “weird behavior” in the code. For example, the app would accept empty XSRF tokens and it was possible to create a token from a salt and the secret, allowing attackers to calculate their own CSRF tokens.

Cookie toss

By adding a second cookie with the same name and forcing an app to use a malicious alternative by setting specific Path attributes, in what is known as a cookie toss, the team could pass the CSRF token header as GET, exploiting the software in the process.

RECOMMENDED  Passwords will be permanently removed by Apple with the upcoming iOS 16 upgrade

“OSS just like commercial software can have vulnerabilities,” Tiron told The Daily Swig. “Companies relying on OSS should realize that people behind it are often volunteers and quite often there’s no budget for security tooling or pen testing.”

Fortbridge submitted its findings to the package developer on June 2. The issue was acknowledged a day later, and after further investigation, the maintainer has reportedly decided to mark the package as deprecated.

“Popular open source libraries are a good target for attackers because they impact a large number of applications that are incorporating it,” Tiron told us. “Even if it’s open source and many eyes are supposedly looking at it, the truth is that sometimes the security skills are lacking or there’s no incentive to look for bugs because there’s no bug bounty involved.”

Tiron concluded: “What we see is that companies are very reactive in this area (they rely just on patching) and we recommend that they should be more proactive and do their own security check.”


Get More Stories Like This On: Facebook: @AllNaijaEntertainment, Twitter: @AllNaijaEntertainment
Man who set Ugandan runner Rebecca Cheptegei on fire dies in hospital
Sports2 hours ago

Man who set Ugandan runner Rebecca Cheptegei on fire dies in hospital

European stock markets falls at open
News2 hours ago

European stock markets falls at open

Tesla’s Supercharger stations considered "illegal" in Germany
Automobile3 hours ago

Tesla To Launch Its Full Self Driving Feature In Europe And China Early 2025

Manchester United star Rasmus Hojlund faces delay to injury return
Sports16 hours ago

Manchester United star Rasmus Hojlund faces delay to injury return

William Gallas blames Raheem Sterling for Chelsea ousting
Sports16 hours ago

William Gallas blames Raheem Sterling for Chelsea ousting

Apple Watch Ultra 2 gets a new black color and new straps
Technology16 hours ago

Apple Watch Ultra 2 gets a new black color and new straps

Germany to expand border measures to stem irregular migration
News20 hours ago

Germany to expand border measures to stem irregular migration

The Apple Store website breaks down just hours before the launch of iPhone 16
Technology20 hours ago

The Apple Store website breaks down just hours before the launch of iPhone 16

3,391 Civil Servants to take promotion examinations in Kaduna
News21 hours ago

3,391 Civil Servants to take promotion examinations in Kaduna

Shehu Sani denounces the DSS raid on SERAP’s office
News21 hours ago

Shehu Sani denounces the DSS raid on SERAP’s office

Noel Gallagher could sell catalogue of songs for £200m after Oasis reunion
Entertainment1 day ago

Noel Gallagher could sell catalogue of songs for £200m after Oasis reunion

Noel Gallagher added ‘grumpy middle-aged man’ to the National Portrait Gallery
Entertainment1 day ago

Noel Gallagher added ‘grumpy middle-aged man’ to the National Portrait Gallery

Kendrick Lamar creates history by headlining the 2025 Super Bowl Halftime solo performance
Entertainment1 day ago

Kendrick Lamar creates history by headlining the 2025 Super Bowl Halftime solo performance

Elon Musk pegs the first manned Starship flight to Mars for 2028 with a colony to follow in 20 years
Technology2 days ago

Elon Musk pegs the first manned Starship flight to Mars for 2028 with a colony to follow in 20 years

Amazon Fire Stick users have found a brilliant technique to control their TVs
Technology2 days ago

Amazon Fire Stick users have found a brilliant technique to control their TVs

Arsenal suffer injury scare as Riccardo Calafiori withdraws from Italy squad
Sports2 days ago

Arsenal suffer injury scare as Riccardo Calafiori withdraws from Italy squad

Todd Boehly and Clearlake Capital at breaking point
Sports2 days ago

Todd Boehly and Clearlake Capital at breaking point

Amanda Abbington ‘burning’ at BBC for ‘boys club’ Giovanni Pernice bullying probe
Entertainment2 days ago

Amanda Abbington ‘burning’ at BBC for ‘boys club’ Giovanni Pernice bullying probe

Tributes flows in as Legendary 70s bassist Herbie Flowers dies at age 86
Entertainment2 days ago

Tributes flows in as Legendary 70s bassist Herbie Flowers dies at age 86

Elton John praises Donald Trump for using one of his songs
Entertainment2 days ago

Elton John praises Donald Trump for using one of his songs

Dangote refinery may dump local market
News2 days ago

Dangote refinery may dump local market

Survivors of Yobe massacre: Decomposing bodies still litter our community after terrorist attack
News2 days ago

Survivors of Yobe massacre: Decomposing bodies still litter our community after terrorist attack

US seeks access to ailing Binance executive
News2 days ago

US seeks access to ailing Binance executive

Real Reason why Petrol from Dangote Refinery is Colorless
News2 days ago

Real Reason why Petrol from Dangote Refinery is Colorless

GTA 6 document provides a complete analysis of all leaks
Technology3 days ago

GTA 6 document provides a complete analysis of all leaks

Tecno Pocket Go recognized for award-winning innovation in AR gaming
Technology3 days ago

Tecno Pocket Go recognized for award-winning innovation in AR gaming

Jamal Musiala confirms Joshua Zirkzee tried to get him to sign for Manchester United
Sports3 days ago

Jamal Musiala confirms Joshua Zirkzee tried to get him to sign for Manchester United

US Open: Jack Draper reveals what made him throw up on court
Sports3 days ago

US Open: Jack Draper reveals what made him throw up on court

Edo State Government suspends school resumption over fuel price hike
News3 days ago

Edo State Government suspends school resumption over fuel price hike

Dangote Refinery
Business3 days ago

Dangote Refinery: NUPENG Vows Protection

Toyota Corolla One Of The Best-selling Cars Of All Time And For Good Reason
Automobile3 days ago

Toyota Cuts EV Target For 2026

Nigerian nurses in the UK, US forced back home
News3 days ago

Nigerian nurses in the UK, US forced back home

FG to construct blood collection facilities in 774 LGs
News3 days ago

FG to construct blood collection facilities in 774 LGs

Certain traits and contentious behaviors James Bond can’t have anymore in 2024
Entertainment3 days ago

Certain traits and contentious behaviors James Bond can’t have anymore in 2024

Nancy Isime revealed her initial fear of fame
Entertainment3 days ago

Nancy Isime revealed her initial fear of fame

Alex Unusual: I didn't leave social media because of AY pregnancy rumors
Entertainment3 days ago

Alex Unusual: I didn’t leave social media because of AY pregnancy rumors

New Xiaomi 10000 Power Bank, 33W with built-in cable arrives
Technology4 days ago

New Xiaomi 10000 Power Bank, 33W with built-in cable arrives

Vivo Y300 Pro packs 6,500 mAh battery in a slim 7.69mm body
Technology4 days ago

Vivo Y300 Pro packs 6,500 mAh battery in a slim 7.69mm body

Liam Gallagher warns fans complaining about 'rip off' Oasis ticket prices to 'shut up'
Entertainment4 days ago

Liam Gallagher warns fans complaining about ‘rip off’ Oasis ticket prices to ‘shut up’

Dequantes Lamar popularly know as Rich Homie Quan, dies at 33
Entertainment4 days ago

Dequantes Lamar popularly know as Rich Homie Quan, dies at 33

Rema donates N105m to home church for supporting family after dad’s death
Entertainment7 days ago

Rema donates N105m to home church for supporting family after dad’s death

One of the best movie of 2024 dropping on Netflix in a few days
Entertainment7 days ago

One of the best movie of 2024 dropping on Netflix in a few days

Pope Francis to stop ‘abomination’ tradition — Morrissey
Entertainment6 days ago

Pope Francis to stop ‘abomination’ tradition — Morrissey

Oasis fans told they can sue Ticketmaster over dynamic pricing following formal complaints
Entertainment6 days ago

Oasis fans told they can sue Ticketmaster over dynamic pricing following formal complaints

Nigerian nurses in the UK, US forced back home
News3 days ago

Nigerian nurses in the UK, US forced back home

Goddess of Pop, Cher in talks to headline Glastonbury’s legends slot in 2025
Entertainment6 days ago

Goddess of Pop, Cher in talks to headline Glastonbury’s legends slot in 2025

Injury breaks Doheny's hopes against Naoya Inoue
Sports7 days ago

Injury breaks Doheny’s hopes against Naoya Inoue

Pope calls for an end to extremism on Asian tour
News6 days ago

Pope calls for an end to extremism on Asian tour

United Kingdom universities face financial crisis
News5 days ago

United Kingdom universities face financial crisis

Anthony Martial offered ‘biggest deal in club’s history’ after Manchester United exit
Sports6 days ago

Anthony Martial offered ‘biggest deal in club’s history’ after Manchester United exit

Chelsea Logo
Sports6 days ago

Chelsea struggling to offload five more stars to meet final transfer target

Volvo
Automobile4 days ago

Volvo To Become Electric-Only Brand 2030

I regret shredding my NCE certificate — Fatima Musa
News6 days ago

I regret shredding my NCE certificate — Fatima Musa

3,590 inmates on death row in Nigeria — NCoS
News6 days ago

3,590 inmates on death row in Nigeria — NCoS

Rivers State gets new NSCDC commandant
News5 days ago

Rivers State gets new NSCDC commandant

Katy Perry lambasted for her 'grotesque' justification for collaborating with Dr Luke
Entertainment5 days ago

Katy Perry lambasted for her ‘grotesque’ justification for collaborating with Dr Luke

Chelsea star Noni Madueke responds to Enzo Maresca raising concern over his training performances
Sports7 days ago

Chelsea star Noni Madueke responds to Enzo Maresca raising concern over his training performances

Ford
Automobile4 days ago

Ford Can Now Show Advertisements In Cars

Manchester United star reveals classy message from Sir Alex Ferguson
Sports5 days ago

Manchester United star reveals classy message from Sir Alex Ferguson

CAC warns unregistered PoS operators as the grace period expires
News4 days ago

CAC warns unregistered PoS operators as the grace period expires

Google Pixel 9 Pro XL facing touchscreen issues
Technology6 days ago

Google Pixel 9 Pro XL facing touchscreen issues

Acer presents new Vero PD2-series projectors with up to 18% more brightness than previous generation
Technology6 days ago

Acer presents new Vero PD2-series projectors with up to 18% more brightness than previous generation

Alex Unusual: I didn't leave social media because of AY pregnancy rumors
Entertainment3 days ago

Alex Unusual: I didn’t leave social media because of AY pregnancy rumors

Succession star’s ‘sinister’ horror film terrifies Netflix viewers
Entertainment4 days ago

Succession star’s ‘sinister’ horror film terrifies Netflix viewers

Hunter Biden pleads guilty as the tax evasion trial starts
News5 days ago

Hunter Biden pleads guilty as the tax evasion trial starts

Certain traits and contentious behaviors James Bond can’t have anymore in 2024
Entertainment3 days ago

Certain traits and contentious behaviors James Bond can’t have anymore in 2024

Roy Keane makes prediction over Casemiro’s Manchester United future
Sports5 days ago

Roy Keane makes prediction over Casemiro’s Manchester United future

The reason I left Chelsea — Conor Gallagher
Sports4 days ago

The reason I left Chelsea — Conor Gallagher

Mercury Prize Award 2024 winner revealed in emotional outpouring
Entertainment5 days ago

Mercury Prize Award 2024 winner revealed in emotional outpouring

Dangote Refinery
Business3 days ago

Dangote Refinery: NUPENG Vows Protection

UNICEF claims Primary healthcare can tackle 90% of diseases
Health5 days ago

UNICEF claims Primary healthcare can tackle 90% of diseases

Six inmates studying for PhD, 1,000 pursuing university degrees – NCoS
News4 days ago

Six inmates studying for PhD, 1,000 pursuing university degrees – NCoS

Nancy Isime revealed her initial fear of fame
Entertainment3 days ago

Nancy Isime revealed her initial fear of fame

Edo State Government suspends school resumption over fuel price hike
News3 days ago

Edo State Government suspends school resumption over fuel price hike

US Open: Jack Draper reveals what made him throw up on court
Sports3 days ago

US Open: Jack Draper reveals what made him throw up on court

FG to construct blood collection facilities in 774 LGs
News3 days ago

FG to construct blood collection facilities in 774 LGs

Dequantes Lamar popularly know as Rich Homie Quan, dies at 33
Entertainment4 days ago

Dequantes Lamar popularly know as Rich Homie Quan, dies at 33

Vivo Y300 Pro packs 6,500 mAh battery in a slim 7.69mm body
Technology4 days ago

Vivo Y300 Pro packs 6,500 mAh battery in a slim 7.69mm body

Toyota Corolla One Of The Best-selling Cars Of All Time And For Good Reason
Automobile3 days ago

Toyota Cuts EV Target For 2026

Xiaomi POCO M7 Pro 5G in new pre-launch leak
Technology5 days ago

Xiaomi POCO M7 Pro 5G in new pre-launch leak

ANE Billboard Hots