Published on 4 December, 2026 by Lana Miro
How a WooCommerce Checkout Vulnerability Left Passwords in Order Data with Francesco Carlucci
In This Episode
A routine database audit led security researcher and software architect Francesco Carlucci to discover a vulnerability in the WooCommerce Stripe Gateway plugin that stored customer passwords in plain text within order metadata.
In this episode of The Melapress Show, Francesco explains how he uncovered, investigated, and reported the vulnerability, why sensitive data may remain exposed even after a security update, and how reviewing database contents alongside source code can help identify overlooked security issues.
All Episode Links
- Official WooCommerce Stripe Gateway security update
- CVE-2026-123145 vulnerability record
- The Melapress Show podcast page
- Listen to the podcast on Spotify, Apple Podcasts, and any other platform.
Key takeaways
Look at the output of your code, not just code itself
Francesco found the vulnerability while reconstructing the order history of an established ecommerce website, not during a security audit. An unexpected field containing customer passwords caught his attention, and further investigation revealed that all affected orders had used Stripe as their payment gateway.
Reviewing what an application actually stores in the database can reveal security issues that are hard to spot in source code alone. Even seemingly legitimate code can create vulnerabilities when it handles sensitive information in unexpected ways.
A security update may not resolve every consequence
Although the plugin update addressed the insecure password storage and introduced a database cleanup routine, passwords could still remain in older backups or third-party systems that had previously received the order metadata.
Francesco explains that affected passwords should be treated as compromised, even if unauthorized access cannot be confirmed. Store owners need to consider where their order data has been shared and how to notify affected customers, especially given the risk of password reuse across services.
Human expertise still matters when using AI for security
Francesco uses AI to generate scripts and automate repetitive tasks while keeping control over his investigations. In this case, finding the vulnerability required understanding why customer passwords should not be stored in order metadata, rather than spotting a common insecure coding pattern.
The discussion also explores how monitoring unexpected database fields could complement existing security checks. Because websites differ in configuration and data structure, technical expertise remains essential to recognize unusual findings and determine whether they pose a security risk.
About the Host
Robert Abela is the founder and CEO of Melapress, where he leads the company’s strategy and ensures the team has the direction and support needed to deliver high-quality WordPress security and management tools.
With more than 23 years of experience in IT and software, Robert hosts The Melapress Show, released on the 1st and 3rd Thursdays of each month. The show features expert interviews, Q&A sessions, and practical discussions focused on WordPress security, user management, compliance, and more.
About the Guest
Francesco Carlucci is a security researcher, software architect, and ethical hacker. In his introduction to the episode, Robert notes that Francesco has more than 500 CVEs to his name.
Francesco has appeared on The Melapress Show twice before, sharing practical security demonstrations. In this episode, he walks through his approach to investigating unexpected database contents, auditing code, and reporting a vulnerability. Find out more on his personal website.
Episode transcript
Robert Abela: Thank you for joining us today. A housekeeping item: a few days ago we released the beta of WP Activity Log 6.0. We have released it as beta because we are shipping the new update of the plugin with a new interface, so there have been a lot of changes. Beta testers will help us test the plugin and also, of course, give us feedback and help us with the direction of the plugin. If you would like to try it out, check it out and give us your feedback, email us at [email protected], and we’ll send you all the details so you can get started. Now let’s jump right away into today’s discussion, a very interesting discussion.
Today’s guest has been here twice already. His previous two episodes are two of the most popular ones.
He’s a security researcher and software architect. He’s also an ethical hacker with more than 500 CVEs to his name. So, let’s welcome Francesco. How are you, Francesco?
Francesco Carlucci: Hello, Robert, thanks for having me again. Happy to be here.
Robert Abela: Likewise, likewise. We’re always happy, especially with your demos people like them. How are you doing? Everything okay?
Francesco Carlucci: Everything okay. Very busy with security these days. A lot of interesting vulnerabilities, a lot of new exploits, so a really busy time for security researchers and security people in general.
Robert Abela: Yes, before we dive into today’s discussion, good point you mentioned it. We’ve been in touch, of course, we talk from time to time over email, and I saw your latest post on LinkedIn, which was quite thought-provoking and something many people have been talking about, and it seems like no one has answered.
So your last post was about AI. We are professionals, me, you, and other people, because we’ve spent years making mistakes, trying something, doing it again, failing again, trying, and that’s how you become professional by learning. Now, of course, with AI, we say that knowledge is cheap because it’s very easy to get things done. However, as humans, the juniors don’t have the opportunity to fail, make mistakes, and learn. What do you think about it?
How do you think, or where do you think it will lead us?
Francesco Carlucci: Well, I don’t know where it will lead us, but I do know that now we live in a time when, if you want to learn something, deeply learn something, you really have to put in a lot of effort because you can use AI to write a script, you can use AI to pen test the site, you can use AI for doing anything, but everything that you offload to the AI, you don’t learn yourself. And learning and getting your hands dirty is what makes you a good designer, a good developer, a good hacker, whatever you want to become.
So my post was more about AI being useful for productivity, useful for business, but for growth, for personal development and for becoming a very good professional, it can actually be a threat.
And so I was brainstorming about this and even myself, of course I use AI like everybody uses AI, but I still try to be the architect and make the AI just be my assistant, give very specific tasks and really try to understand and be on top of the things because the moment you are not on top of the things anymore, you are not learning and if you are studying, if you are delivering a service as a consultant, you are also kind of failing your task because being on top of the things, having the situation under control, is part of your job if you are in tech.
Robert Abela: It is difficult because I look at myself before I used to write content myself. I mean, I still write content, but I do it with the help of AI. Nowadays I use AI, but there are still my ideas, but nowadays I just narrate them, and then I just get AI to help me format them. But before, I had to format it myself, write the first draft, review it, et cetera. And I’m realizing that over the last year, since I’ve been doing it with AI, you almost lose the ability and you lose the patience to actually sit down and write the articles.
So, basically, it’s not helping. In a way, it’s almost not helping. Today I want to talk to you because we’ve been in touch about CVE-2026-123145. I’m sure that number rings a bell to you. Most probably doesn’t ring a bell for many people. Can you give us a brief introduction to what that number is?
Francesco Carlucci: Yeah, so that CVE code is a vulnerability in a WordPress plugin, in a payment gateway, more specifically. And it’s a very unique one because it’s a type of vulnerability that I haven’t seen in many, many years and is insecure storage of cleartext passwords, which means that the plugin was storing passwords in clear text.
And why is this uncommon? When you can just look at the stats of WordPress vulnerabilities, you will find XSS and SQL injection, you will not see insecure storage of passwords and, even more dangerous, cleartext passwords, because it’s not the job of any plugin to store passwords.
You just use the built-in WordPress function or the core to store passwords. So I haven’t seen anything like that in many years. And I also discovered that vulnerability by chance.
So I wasn’t hunting for it like I did many times for other vulnerabilities. I just found it out during an audit, and that triggered some questions for me. I wanted to really understand what was going on under the hood, and that led me to find an actual vulnerability in the plugin code.
Robert Abela: Nice. What I found very interesting is what you actually mentioned in your LinkedIn post as well, is that usually, if there’s a cross-site scripting vulnerability and SQL injection, you upgrade the plugin and the problem is solved. Now, in this case, when you upgrade the plugin with the fix, the plugin no longer writes, no longer stores, clear-text passwords. However, the problem still remains because it’s not cleaning. So people can still read the previous part. Is that correct?
Francesco Carlucci: No, actually, the fixed version of the plugin was cleaning up the passwords.
So, it was cleaning up the passwords. And we can also check later the code that was cleaning the password. But still, the problem remains. Why? Because you have a time window where the password has been stored in clear text.
You have all the staff on your team, of your website, that can access the password. Plus, there is a very subtle factor: the password was stored in metadata, which was not prefixed with an underscore.
There is this convention in WordPress. If metadata is private, it should be prefixed with an underscore. If it’s public, that doesn’t mean that it’s publicly exposed. If it is considered public, it’s not prefixed. So this meta was not prefixed, so it was public.
And then every third party that has access to your order, like a shipping provider, like a backup system, any kind of check-ups on your orders, all these third parties, they all have access to this meta and could theoretically have pulled the password in their system.
So, you have password insecurity, password storage, and also potentially password disclosure with a third party. So, long story short, those users’ passwords are compromised. So you don’t just have to update the plugin. You should also notify the users because the user could use the password on other platforms and all the things that we know.
Robert Abela: Yeah. Okay. That was because I know, I remember that was the issue. It was going back and cleaning it. But as you said, if you forwarded your orders to a shipping company, then the shipping company is going to see the order and know the password. So during that time period, the chances of those passwords being exposed are very high.
Francesco Carlucci: Yeah. Plus there are backups as well. So the plugin can clean your production website, but doesn’t clean your backups or any other place they go. This is clear text storage again. So the password was just there.
Robert Abela: Nice. So you prepared the demo, right? You prepared the demo to show us basically how it is, how you discovered it, and all the messages, right? You want to take us through it? Cause I’m sure as we go through it, I’ll have some questions, actually.
Francesco Carlucci: Yeah. Absolutely. So, before spinning up the demo, yeah, maybe I could start from how I actually discovered the vulnerability because I say that I wasn’t hunting for it. What I was doing was simply an audit of the database.
So, I wasn’t auditing the code. I wasn’t auditing the setup, the website. I was auditing the database because this was an e-commerce site, very big and very old. And I was trying to reconstruct all their order history because these websites, from time to time, clean up the orders because the orders become too many to be stored on the website.
We basically take backups and store them off-site and just bring into the website the last few years. I was trying to reconstruct the database’s order history.
And over time on a WordPress site, you change your plugins, you change the system. And so also the metadata of the orders, they also change over time. And there are some meta that you are not using anymore.
So, I was trying to rebuild the structure that makes sense over like 15 years of activity. And I wrote a script, which I will reproduce now in the demo. Let me start sharing the screen. I wrote a script that was isolating my keys in my order metadata. And I was basically going to the keys manually. And I just saw this key named account password popping up. And I was, oh, there should be something off here.
Robert Abela: Yes, it’s normal to see a key like that usually.
Francesco Carlucci: All right. So, I will spin up this WordPress site. This is a vanilla WordPress site. The only plugins installed are WooCommerce and WooCommerce Stripe Gateway, because we didn’t see it before, but the vulnerability is in the Stripe payment gateway. So the only plugins that are let me open the dashboard.
Robert Abela: Which is not installed by WooCommerce. However, it’s one of the most widely used because many people use Stripe. Is that correct?
Francesco Carlucci: That is correct. And the local site, it seems not to be working, but that’s because, yeah, let me try to, I will tunnel it on a public URL. So there is this thing to reproduce this demo. I have to use Apple Pay or Google Pay as a payment gateway, and they don’t work on a local website.
So, I had to set up also just for clarity, I had to set up an SSH public tunnel to make this work. So it was not an easy day. I’ll spin up the tunnel and let’s see now, because now the local URL is not working.
Robert Abela: I’m assuming Google Pay and Apple Pay don’t work on local sites. So it’s like a second feature. Always trying to look down. There you go.
Francesco Carlucci: Okay. So I’m in my WordPress backend. And so the plugins, as I was saying, are just WooCommerce and WooCommerce Stripe Gateway. Of course, this is a vulnerable version. It’s not updated because if I update the plugin, I fix it. So, the vulnerability was in the WooCommerce Stripe Gateway and more specifically, in the express checkout.
The express checkout is basically the one-click checkout that allows you to pay with Apple Pay, Google Pay, Amazon, I think. So, the kind of small button that pops up. I think I can even show it in the products or in the checkout as well. So, single product. These are the quick checkout buttons, and they are also in the checkout. They pop up here.
And this thing of auditing the database is, I think, something to pin in our minds to discuss further later, because as you will see, this vulnerability was basically impossible to find without auditing the database.
But usually auditing the database is not part of the code audit. So, there is this kind of interesting factor. I also prepared another script. I basically replicated all the scripts that I was using to audit my database.
Now I’m in the root of this local website. And as I was saying, I was basically auditing the meta keys. This is a bash script that basically extracts all the meta keys from the order. So, we can just execute it. And there we go.
All that this script does is read all the orders, read all the metadata, and print out the metadata. Again, I was doing this to try to understand which meta keys to keep in my database reconstruction and which meta I could discard. So, I was trying to understand, like, all the structure, and this meta pops up. And I see account password. And of course, when you see account password, like for me, it immediately rings a bell.
Robert Abela: Yeah, of course. And almost as you’ve said before, it’s clear you’ve discovered this by coincidence rather than the code.
Francesco Carlucci: Yes. So the first thing I do, I see account password. What do I do? I go check some orders in the backend. Now this backend just has a few orders. That backend has hundreds of thousands of orders.
I started checking orders, and I couldn’t find the meta key on every order. So, the second thing I did was to write a script to isolate, write another script to isolate which order was containing the meta key. And I also replicated this on this local install.
So, that executed just to try to reproduce my original process. It’s missing the meta key. Basically, this script takes the meta key as an input parameter, and it gives us all the orders containing the meta key.
We can see numbers 17, 18, and 19 all contain this meta key. I went to open the order, and actually the meta key was there, and the password in clear text was there. And I was like, oh my God, how could this even be possible?
Robert Abela: It’s really when I think about it, because in the order, especially if you have a shipping company, there is also typically the email address. So, you have the combination of what you need. You have the email address and the password, right?
Francesco Carlucci: Exactly. So the first thing that I thought was, so I didn’t immediately think of a code bug because this customer is a structured company. They also take orders on the phone, and you see that this is free-text metadata. So theoretically, you could come here and write the account password and write the password there if you are taking an order on the phone. The first thing that came to my mind was actually a human mistake.
Robert Abela: An agent who takes a few calls, for example.
Francesco Carlucci: Exactly. Something like an agent or even a person taking an order on the phone or creating the account on behalf of the customer and writing because that could be possible. But apparently I didn’t even ask the customer because then I counted the orders and I saw that there were like hundreds of orders with the exposed password. And I was like, okay, no, that should be something going on with the codes.
Robert Abela: Definitely not something manual when you have hundreds of orders with this.
Francesco Carlucci: At that point, also, the website had a huge number of plugins. So, I didn’t even know where the vulnerability was coming from. I started investigating it, and I want to go through the same process here now.
Also, basically I excluded, like, a human or an agent because that was the first thing that came to my mind. But it was on my list, but also it was low on my list because you have to be really, like, not that careful about security to just write a plain-text password in your order metadata. So I said, okay, let’s see if there is something in the code first and then let’s try to investigate eventually agent because this website was a complex one.
So, a lot of integrations, a lot of API keys and a lot of third parties plugged in like shipping providers, support system, chat system, like you have a lot of things interacting. So at first you don’t know where is the problem.
Robert Abela: Even from where to start. Like, when you have a problem like this, do you start with this staging website? Do you take a copy and take it locally? Where do you start from?
Francesco Carlucci: I go to staging. For this type of website, I always have a fresh staging site. So I go investigate on the staging site to avoid the impact on production. The first thing I did, so my way, I think we already discussed this in another episode. My way to investigate vulnerabilities, and also, like anything that I have to search on a website, is just grep. I use grep.
I like the simple, clean command grep. So what do I do at this point? I suspect that the vulnerability is in a plugin because the plugin is the most likely place that could fail. It could be the theme, it could be a custom script, but if I have to start somewhere, the plugin is the first place that I go to check.
So, I’m in the root directory now. I will change to app, public, wp-content, plugins.
Robert Abela: So for those who are not familiar, grep is a Linux, the Unix tool. It’s a search tool. It’s just for text.
Francesco Carlucci: It basically allows you to search a large code base recursively and also using regular expressions.
Of course, the first thing that I try to search for is account password because, like, in my mind, it’s like, do you want to see that someone in the code is purposely storing an account password? So let’s try to do that. And you do grep, which stands for recursive. You pass the word or the expression that you want to search for and the dot, which means, like, you search this folder and all the children.
And ironically, I usually also use, usually try to exclude JavaScript. So I don’t have this blob, and it’s more readable. So I type in grep- B, where B is the parameter for exclude. So it’s like an inverse search, exclude, exclude this kind of result. And now, as you can see, it’s really clean.
And in the beginning, I actually found these in the code. And I was like, okay, I found this. This is it. Because, you know, you see these fields, account passwords. Okay. This is starting the path 100%. So next step, what I do is I go and investigate the code. So I take the file path, and I use sub, which is like the command to open Sublime, which is just the code editor. You can use VS Code or whatever.
Robert Abela: Or nowadays you can use AI to investigate it.
Francesco Carlucci: Or you exactly. But I actually didn’t, I tried to use it. And also when I get to the point where I can show you the vulnerable code, I will also show you how it was impossible for an AI to spot it. We’ll see why.
Robert Abela: And that’s why, quite frankly, what we discussed at the beginning of this episode, where having experience still matters, even though we have AI.
Francesco Carlucci: Yes. Yes. Yes. So I go check this code. And then I see immediately that this is not the vulnerable code, because it’s just registering the field. It doesn’t have anything to do with the checkout and storage, it’s just registering the field. And this is also, like, registering some kind of field. So it’s like the vulnerability could not be here. Actually, this is getting the posted data.
I don’t remember getting posted data from the checkout form. Actually, this was a candidate. Now the vulnerability is a couple of months old. I don’t have everything fresh in my mind anymore. But this function was actually a candidate because it’s getting the posted data and is what it’s doing. Let’s see. No, it’s just getting posted data and formatting it.
It’s not storing in the scope of the function itself. But I most probably try to investigate these, and I excluded it right away. So, the vulnerability was not here. Next, I basically kept searching. And how do I keep searching? I basically keep grepping for something. And my next idea was something like update post meta or update order meta, something like that. With an underscore as well.
Robert Abela: Of course, this shows to do these types of searches, you have to be at least familiar with the way.
Francesco Carlucci: Yes. But yeah, if you are a WordPress developer, you know, especially, as you said, hunting vulnerabilities. And so I have a database in my mind of common functions that are vulnerable.
But if you are not, in this case, I think that AI could be useful in the sense that, you know, you just ask it for a list of strings to search for in this context. So, you don’t let AI just replace you and go ahead and do the work. You just, if you are stuck, if you don’t know what to search for here, just limit the scope to this kind of app. So, give me the strings that you will search for this vulnerability in this codebase, this language, and so on. At least this is how I would use it.
Robert Abela: You got much more now.
Francesco Carlucci: Yes. I got much more. And of course, I would go to this because these are all kind of that. And this is actually how I used to investigate vulnerabilities until basically today. I look for candidates, and then I open the file, and I check the code because this is also the way you train yourself to do code audits.
So, this could be, you know, this is like a variable with checkouts, custom checkout data. So this will be very high on my list. And I think this is the one. So, you see a variable which contains custom checkout data. And so it’s very likely to be the guilty one. And if it’s not this, I’ll try to speed this up to not be boring about this because this could take hours.
So, it was the other one, order meta.
Robert Abela: Yeah. Or their update or their meta.
Francesco Carlucci: So, I think this was it because you see persist entered values only where no other is hooked. Client-controlled and must not overwrite internal, which is like meta. So this comment is telling us that this function takes some meta, some data, as an input, and it persists it in the order meta. And you can see that it’s looping through all the custom checkout data, then converting it into key-value pairs and just storing it.
This was the guilty one. And as you can see, it’s really hard to spot. So, if you feed this code to a static code analyzer or if you feed it to the AI, it’s really difficult to spot a vulnerability because the code is doing nothing bad.
Robert Abela: It’s not like I was going to say, it’s not like when it’s, for example, I don’t know, it’s cross-site scripting. It’s just a lack of sanitization or even SQL injection. But this one, it’s actually legit code. You need context to understand what this was doing.
Francesco Carlucci: You need to know that in the input data, there could be something sensitive. And I remember that to validate this vulnerability, well, not to validate that this was the smoking gun, I did something really dirty, but I’m not, like, it’s not something I’m afraid to share. I basically did something like this. I added an if statement, which says if the key is account password, let the value be spotted. At this point, with this new custom code in place, I could go back to the website.
Robert Abela: And if an order is placed, then the value will be spotted. You know, that is the piece of code that’s writing those custom fields.
Francesco Carlucci: So, I log out because I don’t want to be an admin. And I have to create a new account because, of course, this vulnerability was storing passwords of newly created accounts, not existing accounts.
That goes without saying. I add something to the cart. Go to checkout. I have to fill all the data, but I believe that if I pay with quick checkouts, in test mode, sorry, if I’m in development mode, it will fill dummy data for me as far as I remember. I just click create account, and I fill in a longer random password, as you can see. And then I can go ahead with Google Pay, which I think is easier.
So, now we have the Stripe test window, which asks me if I want to fill the order or complete. So I complete the order. And there we go. Let’s go see. The order number is 20. Here we go. There it is. Spotted. In this way, I basically, you know, I added this extraction here to make sure that this was the code that was triggering the vulnerability.
Of course, I wasn’t sure. And I still, honestly, I’m not sure even today that this is the only part of the code that was triggering it. But, you know, for the sake of reporting, it doesn’t matter. Because also the development team knows that there is something off. I guess they will check all the code pieces that contain this kind of logic.
Robert Abela: So you report it. It was fixed. Did you ever, just curiously, did you ever find out what the logic behind this code, this function?
Francesco Carlucci: Yeah. I’m back in the window, by the way. I will show the screen again, and I will show how it was fixed. And what I think was the logic that led to this mistake. But, I think it’s more like the person or the AI who wrote that code was not aware, was not thinking that in the checkout data, there could be something sensitive.
Like, honestly, it’s really weird because you don’t get so, this is there are a lot of things going on here. The function is taking as an input, an array, a group of data, which is user controlled. So, this is already a very bad thing because also in the fix, they are not storing account password anymore.
But if the array is user controlled, it means that I may be able to store other type of keys and also I can try other attacks. I can try to inject a PHP object injection payload. So, already the fact that there is a function at checkout that takes a controlled user data as an input and stores it as metadata is, I will say is a bad design pattern.
Robert Abela: Yeah, that’s bad practice already. Everyone knows that. You just never use user input data like that.
Francesco Carlucci: Yes. You should define the keys that you accept. And if there is another plugin that wants to hook their own keys, you put a filter, you put a hook there that the other plugin can use the hook and the extend, but you don’t take no offense to the person who wrote that code, but you don’t take the whole user-controlled payload and you just store in the database.
So, I could go farther and I could hammer hard on that piece of code and see potentially I could find other vulnerabilities there. But again, I wasn’t hunting. I was just trying to make a database reconstruction.
And back to this, what I was going to say is that most of the time we tend to audit just code, but you see how important it is to also change perspective and only look at the output of the code.
So, you don’t even look at the code. You just look at the output, look at the final result of the code, and see if there is something off. Because I see almost nobody that I work with audits the database looking for malware, looking for SEO spam injection. And this is not the first time I have found something like this because, if you remember our other conversation, we found SEO spam.
That could also be possible to find with database analysis.
Robert Abela: It’s interesting because usually I think people assume they only check the code because if some things ended up in the database, they typically have ended up there through some code that was executed and has put the data there. So, you would assume that you would always find that one. But as you’ve seen in this case, as you said, when you look at the code by itself, especially if you have no context, it’s doing nothing wrong. It’s not doing anything in particular. And it’s true.
As you told me in emails, it’s a different type of vulnerability. As in cross-site scripting, you would be, or as in an injection, you would run some tests, and you would expect certain output. In this case, you just saw something like that looked suspicious. From where should we begin?
You saw the end of the byproduct of the issue, and you had to work backward rather than trying to exploit it yourself.
Francesco Carlucci: Yes. That’s something I always recommend to do. If you see something that doesn’t add up, go investigate it because that’s the way you find interesting things. Well, of course you don’t find plain text passwords every day because I also checked or I skipped actually, I think I skipped a critical step.
So, that led me to the WooCommerce Stripe plugin because when I was dumping all the orders containing them, let me go back to that. I think that’s interesting to understand.
Robert Abela: I think as a side comment while you are preparing the rest. Yeah, I think it’s also, some people have it, some people maybe not. It’s part of your analytical mindset because many people might be doing the work that you are doing, restoring the orders, trying to find the order. They see a key account password, they don’t even question it and just continue with the work.
Francesco Carlucci: Yeah. It may be, but I’m curious.
Robert Abela: Exactly. It’s the mindset.
Francesco Carlucci: So, okay. Now I’m back at the root of the project. When I was executing the script to print the orders, I was also dumping all the data of the order, including the payment gateway. And I noted that the payment gateway was always Stripe. You can see it here, right?
Yes, you see it. So on more than 130 orders, they were all paid with Stripe. So that also led me to investigate the plugins. Yeah. I almost forgot this step because, again, almost two months passed and I’m onto other things now. So, the reason why I went to investigate plugins was actually that these orders all had the payment gateway in common. So there must be something off with Stripe.
Robert Abela: With the specific payment gateway or the plugin or the files that handle the payment gateway.
Francesco Carlucci: Yes. And this is another takeaway that I try to practice. So before jumping into the investigation, look at the issue, look at the data and try to match some points, to match some numbers, to understand the best path to follow because you could go in any direction and easily get lost.
Robert Abela: I think this is one, as you said in the beginning, quite frankly, now connecting the dots backwards, it’s almost impossible to detect with AI as in like, I don’t know, it depends how much context the agent has, but unless the agent knows that account password shouldn’t be there and that is the account password of the new account created, it will never see anything wrong with that, with that meta key in the order, right?
Francesco Carlucci: Yeah, exactly.
Robert Abela: And that’s where the human factor comes in, basically.
Francesco Carlucci: Yeah, yeah. And just the way that we think about vulnerabilities, we think in a completely different way compared to AI. AI is very effective at finding, for example, like memory exploits. These days, we are seeing a lot of remote code execution in web servers. We have seen nginx in libraries, we have seen with Brotli, like finding that kind of memory leaks that allow an attacker to basically inject code in a request or redirect the program output to execute code is very hard and AI is very good at that because it can be done with fuzzing, with brute forcing, with testing millions of combinations.
That’s more a technical thing, a technical activity. It’s not a lot of a thinking activity. In fact, we have been using fuzzing way before, like AI.
AI is just getting better and better at finding memory exploits, but logic bugs, I think, still belong to humans.
Robert Abela: Yeah. I remember there was this case in before I started working in WordPress, I used to go to OWASP chapters and I remember when Bing launched their ads platform in the early days, they had this logical issue.
So, they promoted that if you purchase $100 worth of advertising, they will give you $100 back. And they had a logical bug. Even if you buy $1 worth of advertising, they will still give you $100. Something like that. Something very basic. I remember someone reporting this issue and talking about it on one of the OWASP chapters. Something like that. The AI can never find it because it lacks the logic. The logic is like you pay something, you get what is promised. It’s not a vulnerability. It’s just a logical mistake. But you’re right.
AI is really good at doing repetitive technical tasks at a much higher volume and a much wider variety, at least. So, that beats us humans. For those who are new, you found the issue. Yeah. How do you go about it then? Can you walk us through the process? What do you do?
Francesco Carlucci: Well, the plugin is maintained by Automattic. Automattic has a bug bounty program. In this case, it’s easier. Just know where to go to report. I open a ticket there. I create a bug vulnerability report. I send to them. It’s well written. It explains everything. There’s a proof of concept. I also added the vulnerable code. I also did the work to find where was the code mistake. So, all they have to do is just to validate and deploy a fix that we can also see now because we can download the new updated plugin version and see how it was fixed.
Robert Abela: I think something else which I noticed in one of your LinkedIn posts. You mentioned GDPR because, since the passwords have been exposed, I mean, never guaranteed, but you never guaranteed that they weren’t exposed either. Since the passwords have been exposed, potentially exposed, according to GDPR, you should contact your customers and tell them about it, etc. Which, in this case, because people complain about compliance sometimes.
But I think in this case, you can see how helpful compliance is because most people would just brush these types of things under the carpet. Especially as you said, this unfortunate common practice, someone using the same email address and passwords on their every website, Facebook, Google, etc. Then they would be wondering how they are hacked.
But if the vendor that had a WooCommerce website had this issue and contacted them, at least it gives them the incentive to change the password, at least.
Francesco Carlucci: It’s a chain. This is a big chain because first of all, the passwords have been exposed because even if they are not exposed to other parties, they still have been stored in plain text and at least the owner of the website and their employees, the shop manager could see that.
The moment that the password is stored in plain text, it’s gone, it’s exposed. So, that’s considered compromised. In this case, it’s worse because it could be also been leaked to other parties. So, understand the password as like user password have to be considered exposed.
And also, I think that the reporting liability is not on WooCommerce or the developer of the plugin, but is on every website owner that uses the plugin.
Robert Abela: No, of course. I mean, you’re using that software, the passwords. If my website is, I don’t know, melapress.com and we had those passwords on our website. Now, regardless of who developed that plugin, it’s software we’re using. The customers are ours, not WooCommerce customers. So, it’s up to us to contact them, no? I think that’s how it works.
It’s a very interesting issue. I really liked it. When you contacted me about it, I was excited to hear about it. And it’s funny how, in hindsight, it looks very simple, something very simple. And it’s always, I think it highlights one point. I always talk about, especially later, I’ve been talking a lot about user education.
People who work online, especially developers, should have at least a basic understanding of security. They don’t have, not everyone has to be an ethical hacker of your level, but at least some basic understanding. Because, as you can see, even professional companies, even big companies, make mistakes. I mean, everyone makes mistakes.
I’m not pointing fingers, but even we made mistakes, everyone has mistakes, but it really highlights how important it is to have good checks in place, good checks and balances, all this as much as possible, et cetera, because these things still leak and they can be quite harmful to a company.
Francesco Carlucci: Yeah. And you have to iterate over time. For example, I’m really considering for customers that really care about security to start implementing database monitoring. Well, as some companies do already, but not everybody does. And I mean, if this issue has been on for 20 days, there are only a few companies doing that because database monitoring will immediately spot that.
Robert Abela: Yes, it’s interesting. But also you need, I don’t know, again, it’s just thinking it out, but you still need the human factor to see what is new in the database, what’s being stored that’s new and to understand like, oh, should this be here? Should this be in clear text, et cetera?
Francesco Carlucci: Yeah. That’s why I was thinking about improvements, because, for example, you cannot scan the database as you scan for malware because there is no malware.
But if you know, so if you are a DB architect, you want to be on top of the things, and you know things, and you know the keys that are supposed to be written, and you make a list of that. And at some point, a new key pops up.
You don’t understand where it’s coming from. And that’s not a clever thing because it could fix this issue, but also it will fix someone being able to push arbitrary data into your database. So with security, you are never done. So there is never a final state of the art. There is always something else that can be done, but you also have to balance the costs, expenses, and effectiveness.
But again, if you’re serious about security, this could be like a very good process. Also, an issue is coming over and over, and you have a way to fix that why not implement a custom check into a complete security stack for your organization?
Robert Abela: No, I like the idea. It makes sense. Especially as you said, I don’t know, you’re using WooCommerce, and you know, whenever there is an order, there will be the first name, last name, the address stored, I don’t know, the payment types and the account passwords, for example, in the metadata. However, if one fine day a new key pops up, then at least you can, you can take a look, you can check that out and see what it is. Are there any already existing solutions for these types of problems?
Francesco Carlucci: Sorry. I don’t know. I don’t know. The thing is that security products, we have a lot of security products out there, but most of them, they are black boxes. So, they advertise, they advertise all the same thing, like attack surface monitoring, DAST, code scanning, but then what the security product really does, it’s, you know, only if you use it.
Most of the things I prefer doing custom, because I like taking responsibility for my work. So I don’t know if there are products, but for sure now we live in times where if you know how to code and how to, you know, orchestrate some agents, you can set up something useful really quick. As I was saying before, I’m not against using AI.
You can use AI to speed up your work as long as you, as you are on top of things. The scripts that I’ve been using before, they are all AI-generated, but they are AI-generated with specific instructions. So make me a script that lists the order meta keys, that tracks the order meta keys. So, it’s like a junior developer doing the dirty work that I used to do before.
Robert Abela: Most probably, again, it’s just, just me hypothesizing, but most probably it’s relatively easy to develop such a tool that checks the database. But then it definitely would require a lot of customization because every website is different.
Yes. If there are 10,000 websites using WooCommerce in over a hundred different countries, as we know, every country has different taxes, different things. So every website in a different country would have different fields, different ways of storing things or different places to send this data, et cetera. So it still has to be really customized, fully customizable.
Francesco Carlucci: You can generalize, like showing me the last 10 added new keys in the database. So it could be generalized in some way, but yeah, again, this is also a different way of thinking because I work custom all the time. You are more in charge of a product that goes wide.
Robert Abela: Mainstream.
Francesco Carlucci: So, it is also interesting to see how different the approach is.
Robert Abela: Exactly. We were already thinking, in different ways, but about the same, about the same problem. It is very interesting. Thanks a lot, Francesco. Do you have anything else to add about this issue?
Francesco Carlucci: No, no. I mean, I could show, I could show how it was fixed if you think it’s interesting.
Robert Abela: Yes, of course.
Francesco Carlucci: Okay. So, this is a way that people can also use to understand any kind of vulnerability. If you know that the plugin version is vulnerable and the version where it was fixed, you can just compare them and try to train yourself to see the code differences. So, I have a script for this as well. It’s a long script. I don’t remember. Let me see if I used it recently. No. Here we go. So the script is this plugin diff, and I pass the handle, the name of the plugin, and the versions.
So, it pulls the two plugins, as you can see, it compares them, and it isolates the differences, and it also gives me a one-liner to open the code in VS Code because VS Code highlights the difference with color. So it’s easier to read the code. Okay. So those are the differences between 10.9.0 and 10.9.1. And the fix is somewhere here. I know this sounds really tiring, but again, this is the way you get good at this.
Let me search for the account. This is a fix. If the field set is account, continue. So it skips. Is the fix strong enough? I don’t know because, as a hacker, I would like to check if the field set can be user-controlled, if it can be spoofed, and so on. But this is how it has been fixed.
Robert Abela: At least step one, hopefully in the future. I agree with you. It seems like, I wouldn’t say flimsy, maybe it’s not the right word, but yeah, they’re just closing the issue rather than securing the whole.
Francesco Carlucci: Yeah. This was the first fix. And then on a newer version, which I don’t know, but there was also implemented a routine that was cleaning up the existing password. It was like a database migration. Actually, it was a database migration because it cleans up, it runs an update, and it cleans up all the collected account passwords.
Robert Abela: Nice. Interesting. Well, very interesting. Thanks a lot, Francesco.
Francesco Carlucci: My pleasure. Always a pleasure to be here.
Robert Abela: Yes. It’s always very interesting. I’m looking forward to people listening to this episode. Before we conclude, can you please tell people where they can find you, learn more about you, and get in touch?
Francesco Carlucci: Always on my website, francescocarlucci.com. You can find my email in the contact section. I always answer questions, collaborations, whatever you want to send my way. I’m always open.
Robert Abela: And a shout-out to your new project, Control Trade, for those who are a bit into trading, et cetera. Francesco is doing a very good job. He’s starting a new SaaS. But you’re also building publicly, documenting it. And you’ve published a good number of videos that I’m following where you explain why you are doing it, how it works, et cetera. So kudos to you.
Francesco Carlucci: Yes. Thank you so much.
Robert Abela: Yes. Thanks, everyone. Thanks for following, and we’ll catch you next time.
