Skip to main content

Automatic information enumeration - Credit Cards

Description

It is possible to automatically list credit card information, as the expiration date and security code are not validated.

Impact

List credit cards in payments.

Recommendation

Filter the information received for payments.

Threat

Attacker with access to the aplication from the Internet.

Expected Remediation Time

⌚ 120 minutes.

Score

Default score using CVSS 3.1. It may change depending on the context of the vulnerability.

Base

  • Attack vector: N
  • Attack complexity: L
  • Privileges required: N
  • User interaction: N
  • Scope: U
  • Confidentiality: H
  • Integrity: N
  • Availability: N

Temporal

  • Exploit code madurity: X
  • Remediation level: X
  • Report confidence: X

Result

  • Vector string: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:X/RL:X/RC:X
  • Score:
    • Base: 7.5
    • Temporal: 7.5
  • Severity:
    • Base: High
    • Temporal: High

Code Examples

Compliant code

The application verifies the credit card is valid using all the information (Number, expiry date and security code)

const accessCreditCards = (req, res) => {
if (isValidNumber(req.body.creditCardInfo)) {
//Sending credit card information based on CC info and user Id
const creditCards = listCards(req.body.creditCardinfo, req.body.userId);
res.end(creditCards);
}
}

Non compliant code

The application only checks the CC number before accesing a list of them

const accessCreditCards = (req, res) => {
if (isValidNumber(req.body.creditCard)) {
//Sending credit card information based only on CC number
const creditCards = listCards(req.body.creditCard);
res.end(creditCards);
}
}

Requirements

free trial

Search for vulnerabilities in your apps for free with our automated security testing! Start your 21-day free trial and discover the benefits of our Continuous Hacking Machine Plan. If you prefer a full service that includes the expertise of our ethical hackers, don't hesitate to contact us for our Continuous Hacking Squad Plan.