<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Parth Upadhyay</title>
    <description>The latest articles on DEV Community by Parth Upadhyay (@parth06).</description>
    <link>https://dev.to/parth06</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3737769%2F06da0b4a-a69d-4459-b70d-ecfa17403613.PNG</url>
      <title>DEV Community: Parth Upadhyay</title>
      <link>https://dev.to/parth06</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/parth06"/>
    <language>en</language>
    <item>
      <title>What actually gets exploited in penetration tests</title>
      <dc:creator>Parth Upadhyay</dc:creator>
      <pubDate>Fri, 06 Feb 2026 06:04:12 +0000</pubDate>
      <link>https://dev.to/parth06/what-actually-gets-exploited-in-penetration-tests-57ii</link>
      <guid>https://dev.to/parth06/what-actually-gets-exploited-in-penetration-tests-57ii</guid>
      <description>&lt;p&gt;I break into apps for a living. I'm a penetration tester at &lt;a href="//www.forticacyber.com"&gt;Fortica Cyberguard&lt;/a&gt;, which means companies pay me to find their security holes before the bad guys do.&lt;/p&gt;

&lt;p&gt;After a few years of this, it's not some zero-day exploit that gets me in. It's usually the same handful of basic mistakes, over and over.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Access control&lt;/strong&gt;&lt;br&gt;
This one feels like cheating. You see a URL like &lt;code&gt;/api/orders/12345&lt;/code&gt;? I change it to &lt;code&gt;12346&lt;/code&gt; and suddenly I'm looking at someone else's order. That's it. Change a number and I can see data I shouldn't have access to.&lt;br&gt;
I've downloaded entire customer databases by just looping through IDs.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The fix:&lt;/em&gt; Check if the logged-in user actually owns the data before you send it back. Include the user ID in your database query.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SQL injection&lt;/strong&gt;&lt;br&gt;
It's 2026 and I still find this everywhere. If you're building SQL queries by smashing strings together with user input, I will get into your database in about 5 minutes.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The fix:&lt;/em&gt; Use parameterized queries. Every database library has them. Or use an ORM - they handle it automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Broken authentication&lt;/strong&gt;&lt;br&gt;
JWT secrets that are literally "secret123". Tokens that never expire. Session tokens in URLs. Secrets in public GitHub repos.&lt;br&gt;
Once I get a valid token, I am that user. I've taken over admin accounts because someone left their JWT secret in a public repo.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The fix:&lt;/em&gt; Use strong random secrets (32+ characters, in environment variables). Make tokens expire. Hash passwords with bcrypt. Rate limit your login endpoint.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exposed secrets&lt;/strong&gt;&lt;br&gt;
Hardcoded API keys. &lt;code&gt;.env&lt;/code&gt; files committed to git. AWS credentials in public repos.&lt;br&gt;
Once I have your keys, I don't need to find vulnerabilities. I just use your credentials to walk right in.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The fix:&lt;/em&gt; Add &lt;code&gt;.env&lt;/code&gt; to &lt;code&gt;.gitignore&lt;/code&gt; now. Use environment variables. Run trufflehog on your repos. If you already committed secrets, rotate them - they're in git history forever.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The mindset&lt;/strong&gt;&lt;br&gt;
These aren't sophisticated attacks. They're basic mistakes that are completely preventable.&lt;/p&gt;

&lt;p&gt;The apps that give me the hardest time? The ones where developers thought about security while building. They questioned every input, verified every permission, assumed everything could be exploited.&lt;/p&gt;

&lt;p&gt;That's the shift. Start thinking like someone trying to break your app, and you'll catch this stuff before it becomes a problem.&lt;/p&gt;

&lt;p&gt;Questions? Drop them below.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>security</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>5 Security Mistakes I See All The Time</title>
      <dc:creator>Parth Upadhyay</dc:creator>
      <pubDate>Sat, 31 Jan 2026 14:39:19 +0000</pubDate>
      <link>https://dev.to/parth06/5-security-mistakes-i-see-all-the-time-33na</link>
      <guid>https://dev.to/parth06/5-security-mistakes-i-see-all-the-time-33na</guid>
      <description>&lt;p&gt;I do security stuff at &lt;a href="//www.forticacyber.com"&gt;Fortica Cyberguard&lt;/a&gt;. Here are five things I keep finding in almost every codebase I look at. Not fancy exploits - just basic mistakes that keep happening.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Trusting client-side validation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Client-side validation is for UX, not security. Anyone can open DevTools and bypass it.&lt;br&gt;
Found a file upload that checked extensions in JavaScript. Renamed a shell script to .jpg and uploaded it. Server accepted it, saved it in the web root. That's remote code execution in 30 seconds.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; &lt;br&gt;
Always validate on the server. Check file headers, not extensions. Validate everything - data types, ranges, formats.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;javascript// This does nothing for security
if (!email.includes('@')) {
  showError('Invalid email');
}

// This actually matters (server-side)
const validator = require('validator');
if (!validator.isEmail(email)) {
  return res.status(400).json({ error: 'Invalid email' });
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Secrets in environment variables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Environment variables aren't a security solution. They're just config.&lt;br&gt;
Common issues:&lt;/p&gt;

&lt;p&gt;.env files in git (found AWS admin keys this way multiple times)&lt;br&gt;
Secrets in Docker build args (stays in image history - run docker history and see)&lt;br&gt;
Environment dumps in startup logs&lt;br&gt;
Secrets printed in error logs&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Better:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Use actual secrets managers (AWS Secrets Manager, Vault, etc.)&lt;br&gt;
For local dev, .env is fine but add to .gitignore&lt;br&gt;
Rotate secrets regularly&lt;/p&gt;

&lt;p&gt;&lt;em&gt;dockerfile&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Bad - stays in image history
ARG DATABASE_PASSWORD=super_secret_123

# Better - injected at runtime
ENV DATABASE_PASSWORD=${DATABASE_PASSWORD}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Rolling your own auth&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Just don't.&lt;br&gt;
There's session management, password resets, rate limiting, token refresh, account enumeration prevention... it gets complex fast.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What happened:&lt;/em&gt; Built JWT auth for a side project. Forgot to validate the algorithm field. Someone sent a token with algorithm: none and it validated. Oops.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What to use:&lt;/em&gt;&lt;br&gt;
Passport.js, NextAuth, Django auth, Devise - whatever's standard for your stack&lt;br&gt;
Or just use Auth0, Supabase, Firebase&lt;br&gt;
If you must build it, use bcrypt/argon2 and follow OWASP guidelines&lt;/p&gt;

&lt;p&gt;Time saved not debugging auth edge cases &amp;gt; cost of these tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Ignoring dependency vulnerabilities&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;npm audit shows 47 vulnerabilities.&lt;/em&gt; "I'll fix that later."&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Spoiler:&lt;/em&gt; Nobody fixes it later.&lt;br&gt;
I run dependency scanners on repos during pentests. Companies have public package.json files showing vulnerable packages. Then it's just finding which one is used and exploiting it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Real examples:&lt;/em&gt;&lt;br&gt;
Equifax breach - unpatched Struts vulnerability&lt;br&gt;
Log4Shell - affected thousands who were "too busy" to update&lt;br&gt;
Found auth bypasses in old JWT library versions multiple times&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix it:&lt;/em&gt;&lt;br&gt;
Set up Dependabot or Renovate&lt;br&gt;
Run security checks in CI/CD&lt;/p&gt;

&lt;p&gt;Actually update things&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bashnpm audit
pip-audit
# Then actually fix them
npm audit fix
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5. Logging sensitive data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Found a production API logging full request bodies. Passwords, credit card numbers, everything. Logs were in Splunk, retained for 2 years, accessible to 30 people.&lt;br&gt;
"Oh yeah, forgot to remove debug logs after launch." That was 3 years ago.&lt;br&gt;
Watch out for:&lt;/p&gt;

&lt;p&gt;Full request/response objects in logs&lt;br&gt;
Exception handlers dumping everything&lt;br&gt;
Debug logs in production&lt;br&gt;
Authorization headers (Bearer tokens everywhere)&lt;br&gt;
Long retention periods&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Better:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;javascript// Bad
logger.info('User login:', { user: userObject });

// Better
logger.info('User login:', { 
  userId: user.id, 
  timestamp: new Date()
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use proper log levels. Debug logs with sensitive data? Fine locally. Production? No.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick takeaway&lt;/strong&gt;&lt;br&gt;
These aren't sophisticated attacks. They're basic stuff that gets skipped when rushing to ship.&lt;br&gt;
About 80% of critical issues I find in pentests are from this list. Not zero-days or nation-state hackers - just missing the basics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick checklist:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Server-side validation on everything&lt;/li&gt;
&lt;li&gt;Secrets in a proper manager&lt;/li&gt;
&lt;li&gt;Use existing auth libraries&lt;/li&gt;
&lt;li&gt;Update dependencies&lt;/li&gt;
&lt;li&gt;Don't log sensitive data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it. Doing these consistently prevents most breaches I've seen.&lt;br&gt;
&lt;em&gt;What else do you see often? Always curious about common patterns.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>security</category>
      <category>webdev</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
