If you're storing tokens in localStorage, read this. Many React apps store JWT tokens like this: localStorage.setItem("token", jwt); Looks simple. But it’s a security risk. Why? Because localStorage is vulnerable to XSS attacks. If an attacker injects JavaScript, they can steal your tokens instantly. Better approach: ✔ Use HTTP-only cookies ✔ Implement proper authentication flow ✔ Protect against XSS Convenience should never compromise security. Small decisions like this can lead to big breaches. Are you still using localStorage for auth? #ReactJS #WebSecurity #JavaScript #Frontend #CyberSecurity
Muhammad Ibrar’s Post
More Relevant Posts
-
Most developers still store auth tokens in localStorage. It’s simple… but risky. ⚠️ If your app gets hit by an XSS attack, malicious scripts can read tokens from localStorage and silently hijack user sessions. One script = Account takeover. A safer approach? httpOnly Cookies 🔐 • Tokens stored by browser (not accessible to JavaScript) • Protected from XSS attacks • Backend handles authentication securely But don’t forget — cookies introduce CSRF risk, so always use: • SameSite=Lax/Strict • Secure flag (HTTPS only) • Refresh token rotation Security isn’t about convenience. It’s about protecting users. localStorage vs httpOnly Cookies — which one are you using? #WebSecurity #Frontend #ReactJS #JavaScript #CyberSecurity #SoftwareEngineering
To view or add a comment, sign in
-
-
Is your #Laravel application accumulating hidden technical debt? Laravel is a powerful framework, but its ease of use can sometimes lead to ‘quick fixes’ that cause long-term performance and security issues. We've identified the 12 most common Laravel mistakes seen across the industry and, importantly, how our team solves them to ensure your product stays robust. But the shift isn't just technical, it requires the right approach from day one. Read the full blog to explore the most common Laravel mistakes and how our development team systematically addresses each challenge: https://lnkd.in/dtTaXkCY #AppOptimization #CyberSecurity #BackendDevelopment #DatabaseOptimization #LaravelBestPractices #PHP #WebAppDevelopment #SoftwareEngineering #TechSolution #CleanCode #LaravelDeveloper #ImpactTechlab #ImpactTechlabLLC #ITL
To view or add a comment, sign in
-
-
If your team uses JavaScript, this is worth a quick read. Last week, a popular npm package called Axios (100M+ weekly downloads) was compromised. Attackers gained access to a maintainer's account and published two malicious versions — 1.14.1 and 0.30.4 — that silently installed a backdoor on any machine that ran a package install during a ~3 hour window. Are you affected? Check if either version was installed — directly or via another package that depends on Axios. Many teams won't even know it's in their stack. If it ran, rotate your API keys, tokens, and cloud credentials, and rebuild your environments from a clean state. Safe versions: 1.14.0 and below, or 0.30.3 and below. Going forward, a few good habits help: → Pin dependency versions exactly → Use npm ci with a stable, committed lockfile → Disable auto-install scripts in CI pipelines The attack has been attributed to a North Korean threat group. The malicious versions have been removed from npm. Worth sharing with your dev or security team if you haven't already. https://lnkd.in/eADkmQZE #CyberSecurity #npm #JavaScript #DevSecOps #InfoSec
To view or add a comment, sign in
-
🚨 Every web developer and pentester needs to see this. I just found a FREE, self-hosted XSS lab — and it's genuinely one of the best hands-on security resources I've come across. 🧪 XSS Lab — 23 Levels of Cross-Site Scripting 🔹 23 progressively harder challenges 🔹 Covers everything from basic injection → CSP bypasses → DOM attacks 🔹 Built for hackers, pentesters & devs who want to truly understand XSS 🔹 Zero external dependencies — just Node.js + Express 🔹 No database. No build step. One command and you're hacking. 🔹 Docker support available too 🐳 💡 The best way to learn how to DEFEND is to first learn how to BREAK. 👇 Drop a ⚡ in the comments if you're trying this out! 🔗 https://lnkd.in/gWyDGgNx #CyberSecurity #XSS #WebSecurity #PenTesting #BugBounty #EthicalHacking #AppSec #InfoSec #NodeJS #LearnToHack #Offesec
To view or add a comment, sign in
-
-
𝐖𝐡𝐞𝐧 𝐝𝐞𝐚𝐥𝐢𝐧𝐠 𝐰𝐢𝐭𝐡 𝐚𝐝𝐯𝐚𝐧𝐜𝐞𝐝 𝐜𝐲𝐛𝐞𝐫 𝐚𝐭𝐭𝐚𝐜𝐤𝐬𝐃𝐢𝐫𝐞𝐜𝐭𝐨𝐫𝐲 𝐅𝐮𝐳𝐳𝐢𝐧𝐠 𝐢𝐬𝐧’𝐭 𝐣𝐮𝐬𝐭 𝐚𝐛𝐨𝐮𝐭 𝐭𝐡𝐫𝐨𝐰𝐢𝐧𝐠 𝐚 𝐦𝐚𝐬𝐬𝐢𝐯𝐞 10𝐆𝐁 𝐰𝐨𝐫𝐝𝐥𝐢𝐬𝐭 𝐚𝐭 𝐚 𝐭𝐚𝐫𝐠𝐞𝐭 𝐚𝐧𝐝 𝐡𝐨𝐩𝐢𝐧𝐠 𝐟𝐨𝐫 𝐭𝐡𝐞 𝐛𝐞𝐬𝐭. 𝐈𝐭’𝐬 𝐚𝐧 𝐚𝐫𝐭 𝐨𝐟 𝐜𝐨𝐧𝐭𝐞𝐱𝐭. In my Bug Bounty hunting and VAPT engagements, I've seen that standard wordlists often miss the most critical endpoints. The real game-changer is creating Custom Wordlists based on the target's technology stack. If the application is built on Spring Boot, your wordlist should look completely different than if it were built on Laravel. Map the tech stack. Scrape the JavaScript files for hidden paths and API routes. Fuzz intelligently, not just aggressively. Sometimes, a single overlooked /actuator/env or .git/config exposure can lead to a complete system takeover. Work smarter, then harder. 𝐖𝐡𝐚𝐭 𝐢𝐬 𝐲𝐨𝐮𝐫 𝐟𝐚𝐯𝐨𝐫𝐢𝐭𝐞 𝐟𝐮𝐳𝐳𝐢𝐧𝐠 𝐭𝐨𝐨𝐥 𝐟𝐨𝐫 𝐝𝐢𝐫𝐞𝐜𝐭𝐨𝐫𝐲 𝐞𝐧𝐮𝐦𝐞𝐫𝐚𝐭𝐢𝐨𝐧?#BugBounty #PenetrationTesting #WebSecurity #EthicalHacking #OSINT #Fuzzing #InfoSec #CyberSecurity #AppSec #AfzalHacker
To view or add a comment, sign in
-
-
Do you know about the recent supply chain attacks in the JS ecosystem? They’re really interesting and help us understand how to protect ourselves, even with small precautions, and why we shouldn’t blindly trust anything. They’re also fascinating to study because they show how clever the use of JavaScript and its ecosystem can be to do things that are quite unusual. I’m putting something together on this topic, might share some of the things I find interesting! #SupplyChainAttack #CyberSecurity #JavaScript #NodeJS Image: Shai Hulud 2.0 worm, painted by Banana Pro
To view or add a comment, sign in
-
-
Why are cookies safer for sending tokens? Many people ask why, when handling authentication, it is usually safer to send tokens in cookies instead of storing them in places like localStorage or handling them manually through JavaScript. The simple explanation is this: When cookies are properly configured, they give the browser instructions on how to protect them. For example: HttpOnly: prevents JavaScript from reading the token. This greatly reduces the risk if a malicious script manages to run on the page. Secure: ensures the cookie is only sent over HTTPS, meaning it will not be transmitted through insecure connections. SameSite: helps limit when the cookie is sent to other sites. This adds a layer of defense against attacks where another site tries to use your session without permission. It also gives us more flexibility in the browser when handling authentication. For example, there is no longer a need to send the token manually in a POST request; the browser can automatically send it as a cookie, even on GET requests. SUMMARY In short, because of the security settings that cookies allow and the ease of handling them, they are highly recommended for sending tokens. #Cybersecurity #WebDevelopment #Backend #Frontend #Authentication #JWT #Cookies #InfoSec
To view or add a comment, sign in
-
🚨 CYBERDUDEBIVASH SENTINEL APEX LIVE THREAT ALERT 🚨 PHP Composer flaws enable remote command execution via Perforce VCS Check out the complete threat intel report on CYBERDUDEBIVASH Official Portal: https://lnkd.in/gj3-VYaN 🏴☠️ CyberDudeBivash Pvt Ltd #CYBERDUDEBIVASH #CyberSecurity #ThreatIntel #CVE #AISecurity
To view or add a comment, sign in
-
Ginger OS now supports Node.js React2Shell proved how easily a library flaw can lead to full system compromise. If an attacker can spawn a shell, it's game over. We built Ginger OS. It's a custom operating system designed from the ground up for security. It's designed to stop remote code execution in its tracks. Node.js is interpreted, so we can't verify every code region. But we can still provide security protections: • Application whitelisting (only approved binaries execute) • File integrity measurement and appraisals • No system utilities (no bash, curl, wget) • Minimal attack surface (under 20 files) We're bringing Ginger OS security to the languages running the web. DM me "Node" to learn more. #nodejs #cybersecurity #infosec #appsec
To view or add a comment, sign in
-
-
What happened? Attackers gained access to a maintainer’s npm account and published malicious versions of Axios containing a hidden dependency: plain-crypto-js. How it works: A post-install script runs automatically Acts as a RAT (Remote Access Trojan) dropper Detects OS → downloads payload → establishes remote access Cleans traces to evade detection What developers should check: Review package.json for affected Axios versions Inspect node_modules for plain-crypto-js What to do if affected: Do NOT rely on deleting files Immediately rotate all API keys & tokens Follow full incident response procedures Key takeaway: Even trusted libraries can become attack vectors. Dependency hygiene and monitoring are no longer optional, they’re critical. #CyberSecurity #SupplyChainAttack #JavaScript #WebDevelopment #DevSecOps #NodeJS #SecurityAlert Learn more: https://lnkd.in/dax4rdDm
To view or add a comment, sign in
-
More from this author
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development