Skip to main content

Technical information leak - Angular

Description

Get technical information about the system, such as:

  • Angular version (ng-version).

Impact

Display technical information of the system.

Recommendation

Disable functionalities that give information about the components used such as names and versions.

Threat

Anonymous attacker from the Internet.

Expected Remediation Time

⌚ 30 minutes.

Score

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

Base

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

Temporal

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

Result

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

Code Examples

Compliant code

No functionalities that show technical information about the system

@Component({
selector: '[data-app]',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
constructor(private _elementRef: ElementRef) {
}

ngOnInit(): void {
this._elementRef.nativeElement.removeAttribute("ng-version");
}
}

Non compliant code

There is information in the code that displays the ng-version of the system

<app-root _nghost-iie-c28="" ng-version="11.0.4"><router-outlet _ngcontent-iie-c28="">

Requirements