8m left·0%
Reading Time: 8 min
Last Updated: August 14, 2026
Main Ideas: 5
Reading Time: 8 min
Last Updated: August 14, 2026
Main Ideas: 5

Topic 5.1 Notes – Application and Data Vulnerabilities and Attacks

Verified for 2027 AP® Cybersecurity Exam
Read aloud
Applications and stored data become security problems when a system treats the wrong thing as trusted, or gives people more access than they need. This topic ties together file weaknesses, permission mistakes, and several classic input-based attacks, then asks you to judge the risk by looking at the asset, the exploit, and the likely CIA damage.

What Application and Data Vulnerabilities Are

An application is a program whose instructions run on a computer, so it is executable data. Some run locally on your device. Web applications mostly run on a server, and you reach them through a browser over a network.

That matters because attacks on apps often become attacks on data like records, credentials, configs, or files.

The damage is usually described with the CIA triad:

  • Confidentiality means unauthorized access to data
  • Integrity means unauthorized changes to data or app behavior
  • Availability means data or apps become unusable

One exam habit that matters here: a flaw by itself is not the full risk. Risk = asset + vulnerability + likely exploit + impact.

File Access and Permission Weaknesses

Unencrypted files

If files are stored in plaintext and an attacker gets the device or drive, they can read them. A login screen or file permission is weaker than encryption if the drive is removed, mounted elsewhere, or the attacker gets deeper system access.

Usual first effect:

  • Confidentiality loss because the attacker can see the data

Standard users and administrative users

A standard user can do normal work. An administrative user can change settings, manage software and accounts, and often access nearly everything on the system.

If a regular user is given admin rights and that account gets compromised, the attacker inherits those elevated privileges too.

What the test wants you to say:

  • The problem is unnecessary admin access
  • The problem is not that admin accounts exist at all

Weak access controls

Weak access controls mean too many users can read, edit, delete, or execute resources they do not need.

On Linux and Unix-style systems, that often shows up as overly broad owner, group, or other permissions.

If one account is compromised, the attacker gets all of that account’s permissions. That can lead to:

  • file theft
  • file deletion
  • changed configs
  • broken applications

Linux file permissions for -rwxr-x---: owner rwx = 7, group r-x = 5, other --- = 0, written as chmod 750

The diagram is a quick reminder of how permissions are grouped for the owner, the group, and everyone else, and how the same settings can be written in numeric form with chmod.

How Input-Based Application Attacks Work

The common building block is data validation. Applications should check input for:

  • type
  • length
  • range
  • format
  • allowed characters
  • required values

If that checking fails, the app may treat hostile input as instructions instead of data.

SQL injection

SQL is the language used to query and modify databases. SQL injection happens when user input is inserted into a query unsafely.

Classic payload:

' OR 1=1 --

That can make a query return extra records, bypass conditions, change data, or delete data. This can hit:

  • Confidentiality by exposing records
  • Integrity by changing records
  • Availability if data is deleted

Cross-site scripting XSS

Websites use HTML, and many use JavaScript, which runs in the visitor’s browser. In XSS, malicious script gets executed by the browser as if it came from the site.

  • Type I reflected XSS means the payload comes in a crafted link or request and is reflected back immediately.
  • Type II stored XSS means the payload is saved on the site, like in a comment, and later hits visitors.

Big threat:

  • stealing browser-accessible data such as session info or other sensitive values

Buffer overflow

A buffer is a fixed-size memory area for input. If the input is too large, it overwrites nearby memory.

Results can include:

  • app crash
  • corrupted behavior
  • unauthorized code execution

The biggest CIA hit is often availability, though integrity and unauthorized actions can follow.

Directory traversal

Web apps often use HTTP GET requests to reach server files. In directory traversal, the attacker changes the path with ../ to move outside the intended folder.

Example: a web server keeps site images in /var/www/images/. An attacker requests ../../../etc/passwd instead of an image. Each .. climbs one directory, so three of them reach the root, and the request pulls the passwd file that lists every authorized username on the device.

Main risk is confidentiality, though writable paths could also damage integrity or availability.

Comparing the Attack Types

AttackWhat changesWhere it runs
SQLiquery logicdatabase
XSSpage content or scriptuser browser
Buffer overflowmemory contentsvulnerable program
Directory traversalfile pathserver filesystem or app file access logic

This table is great for MCQs because the exam loves asking what interpreted the hostile input.

Assessing Risk From These Vulnerabilities

A strong risk write-up names:

  1. the asset
  2. the vulnerability
  3. the likely exploit
  4. the likelihood
  5. the CIA impact
  6. the overall risk level

Risk levels usually look like this:

  • High means highly sensitive or regulated data plus a likely exploit
    Example: Air Force jet engine specs on an unencrypted drive
  • Moderate means sensitive data with weak encryption or loose access controls
    Example: customer PII in a spreadsheet encrypted with a small key
  • Low means less sensitive data with weaker protection
    Example: CEO memos on an open unencrypted share drive
  • Very low means public data that needs no confidentiality
    Example: a web server storing the images it displays on a public website

Key Takeaways

Unencrypted files usually create a confidentiality problem first because anyone with the drive or enough system access can read the plaintext.
Compromising an admin-level account is more dangerous than compromising a standard account because the attacker gains elevated privileges too.
Weak access control means the attacker only needs one over-permissioned account to reach many files or break an app.
SQL injection targets the database, XSS targets the browser, buffer overflow targets memory, and directory traversal targets file paths.
Reflected XSS comes from a crafted request, and stored XSS lives on the site and affects later visitors.
Buffer overflow is about oversized input overwriting adjacent memory, not just “too much text.”
A risk answer is incomplete unless you connect the weakness to a likely exploit and then to the CIA impact.
High, moderate, and low risk depend on data sensitivity, exploit likelihood, and impact together, not on the flaw alone.

AP® is a trademark registered by the College Board, which is not affiliated with, and does not endorse this website.

Notes

1 credit used · 5/5 remaining